Clicking on "Debug" starts the python debugger rather than calling only the cpp executable, resulting in ValueError: source code string cannot contain null bytes
errors. While the "Run" click works fine with cpp executable.
/home/sgao/anaconda3/bin/python /home/sgao/.vscode/extension
s/ms-python.python-2019.9.34474/pythonFiles/ptvsd_launcher.py --default --client --host localhost --port 45231 /home/sgao/Documents/sim/build-Debug/sim-slicer/test/sim_slicer_test --gtest_
color=no --gtest_filter=slicer.loading --gtest_break_on_failure
Traceback (most recent call last):
File "/home/sgao/.vscode/extensions/ms-python.python-2019.9.34474/pythonFiles/ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "/home/sgao/.vscode/extensions/ms-python.python-2019.9.34474/pythonFiles/lib/python/ptvsd/__main__.py", line 432, in main
run()
File "/home/sgao/.vscode/extensions/ms-python.python-2019.9.34474/pythonFiles/lib/python/ptvsd/__main__.py", line 316, in run_file
runpy.run_path(target, run_name='__main__')
File "/home/sgao/anaconda3/lib/python3.7/runpy.py", line 261, in run_path
code, fname = _get_code_from_file(run_name, path_name)
File "/home/sgao/anaconda3/lib/python3.7/runpy.py", line 236, in _get_code_from_file
code = compile(f.read(), fname, 'exec')
ValueError: source code string cannot contain null byte
[2019-09-05 06:28:36.140] [INFO] [at TestAdapter.debug (/home/sgao/.vscode/extensions/matepek.vscode-catch2-test-adapter-2.7.1/out/src/TestAdapter.js:222:19)] Debugging
[2019-09-05 06:28:36.141] [INFO] [at TestAdapter.debug (/home/sgao/.vscode/extensions/matepek.vscode-catch2-test-adapter-2.7.1/out/src/TestAdapter.js:246:19)] testInfo: GoogleTestInfo {
_shared:
SharedVariables {
log:
Log {
configSection: 'catch2TestExplorer',
workspaceFolder: { uri: [g], name: 'sim', index: 0 },
outputChannelName: 'Test Explorer: sim',
inspectOptions: { showProxy: true, depth: 3 },
includeLocation: true,
targets: [ [FileTarget] ],
nextInspectOptions: undefined,
configChangeSubscription: { dispose: [Function: dispose] } },
workspaceFolder:
{ uri:
g {
scheme: 'file',
authority: '',
path: '/home/sgao/Documents/sim',
query: '',
fragment: '',
_formatted: 'file:///home/sgao/Documents/sim',
_fsPath: '/home/sgao/Documents/sim' },
name: 'sim',
index: 0 },
testStatesEmitter:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: r { _first: [n], _last: [n], _size: 1 },
_deliveryQueue: r { _first: [n], _last: [n], _size: 0 } },
loadWithTaskEmitter:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: r { _first: [n], _last: [n], _size: 1 } },
sendTestEventEmitter:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: r { _first: [n], _last: [n], _size: 1 } },
retire:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: r { _first: [n], _last: [n], _size: 1 } },
rngSeed: null,
execWatchTimeout: 10000,
retireDebounceTime: 1000,
_execRunningTimeout: 600000,
execParsingTimeout: 5000,
isNoThrow: false,
enabledTestListCaching: false,
googleTestTreatGMockWarningAs: 'nothing',
googleTestGMockVerbose: 'default',
_execRunningTimeoutChangeEmitter:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: r { _first: [n], _last: [n], _size: 0 } },
onDidChangeExecRunningTimeout: [Function],
taskPool:
TaskPool { _maxTaskCount: 1, _runningTaskCount: 0, _waitingTasks: [] } },
testNameAsId: 'slicer.loading',
label: 'loading',
skipped: false,
line: 5,
type: 'test',
lastRunState: 'passed',
lastRunMilisec: 4270,
id: '35',
origLabel: 'loading',
description: '',
file:
'/home/sgao/Documents/sim/sim-slicer/test/sim_slicer_test.cpp',
tooltip: 'Name: slicer.loading' } [ '35' ];
[2019-09-05 06:28:36.144] [INFO] [at TestAdapter._getDebugConfigurationTemplate (/home/sgao/.vscode/extensions/matepek.vscode-catch2-test-adapter-2.7.1/out/src/TestAdapter.js:346:35)] using debug config from launch.json
[2019-09-05 06:28:36.145] [INFO] [at TestAdapter.debug (/home/sgao/.vscode/extensions/matepek.vscode-catch2-test-adapter-2.7.1/out/src/TestAdapter.js:300:19)] Debug: resolved debugConfig: { name: 'loading (sim_slicer_test ➡️ slicer)',
type: 'python',
request: 'launch',
program:
'/home/sgao/Documents/sim/build-Debug/sim-slicer/test/sim_slicer_test',
args:
[ '--gtest_color=no',
'--gtest_filter=slicer.loading',
'--gtest_break_on_failure' ],
console: 'integratedTerminal',
cwd: '/home/sgao/Documents/sim/sim-slicer',
target:
'/home/sgao/Documents/sim/build-Debug/sim-slicer/test/sim_slicer_test',
arguments:
'"--gtest_color=no" "--gtest_filter=slicer.loading" "--gtest_break_on_failure"',
env:
{ KDE_FULL_SESSION: 'true',
GS_LIB: '/home/sgao/.fonts',
PAM_KWALLET5_LOGIN: '/tmp/kwallet5_sgao.socket',
USER: 'sgao',
LC_TIME: 'zh_CN.UTF-8',
XDG_SEAT: 'seat0',
XDG_SESSION_TYPE: 'x11',
SSH_AGENT_PID: '2918',
SHLVL: '1',
HOME: '/home/sgao',
QT4_IM_MODULE: 'fcitx',
DESKTOP_SESSION: '/usr/share/xsessions/plasma',
XIM: 'fcitx',
QT_LINUX_ACCESSIBILITY_ALWAYS_ON: '1',
GTK_MODULES: 'gail:atk-bridge',
XDG_SEAT_PATH: '/org/freedesktop/DisplayManager/Seat0',
KDE_SESSION_VERSION: '5',
LC_MONETARY: 'zh_CN.UTF-8',
DBUS_SESSION_BUS_ADDRESS:
'unix:abstract=/tmp/dbus-77J7wCKzZp,guid=4f5920e469eed4f3cc7f0fb55d707c06',
SSH_ASKPASS: '/usr/bin/ksshaskpass',
QT_QPA_PLATFORMTHEME: 'appmenu-qt5',
MANDATORY_PATH:
'/usr/share/gconf//usr/share/xsessions/plasma.mandatory.path',
XIM_PROGRAM: 'fcitx',
LOGNAME: 'sgao',
GTK_IM_MODULE: 'fcitx',
XDG_SESSION_CLASS: 'user',
DEFAULTS_PATH: '/usr/share/gconf//usr/share/xsessions/plasma.default.path',
XDG_SESSION_ID: '2',
GTK2_MODULES: 'overlay-scrollbar',
PATH:
'/home/sgao/bin:/home/sgao/.local/bin:/home/sgao/node/bin:/home/sgao/Documents/Go//bin/:/home/sgao/Documents/Apps/julia/bin/:/home/sgao/bin:/home/sgao/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin',
LC_ADDRESS: 'zh_CN.UTF-8',
XDG_SESSION_PATH: '/org/freedesktop/DisplayManager/Session1',
XDG_RUNTIME_DIR: '/run/user/1001',
XCURSOR_THEME: 'breeze_cursors',
DISPLAY: ':0',
LC_TELEPHONE: 'zh_CN.UTF-8',
LANG: 'en_US.UTF-8',
XDG_CURRENT_DESKTOP: 'KDE',
XMODIFIERS: '@im=fcitx',
XDG_SESSION_DESKTOP: 'KDE',
XAUTHORITY: '/tmp/xauth-1001-_0',
SSH_AUTH_SOCK: '/tmp/ssh-TRjgmwDZlh6X/agent.2877',
SHELL: '/bin/bash',
PAM_KWALLET_LOGIN: '/tmp/kwallet_sgao.socket',
LC_NAME: 'zh_CN.UTF-8',
QT_ACCESSIBILITY: '1',
LC_MEASUREMENT: 'zh_CN.UTF-8',
LC_IDENTIFICATION: 'zh_CN.UTF-8',
XDG_VTNR: '7',
QT_IM_MODULE: 'fcitx',
PWD: '/home/sgao',
XDG_CONFIG_DIRS:
'/etc/xdg/xdg-/usr/share/xsessions/plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings',
XDG_DATA_DIRS:
'/usr/share//usr/share/xsessions/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop',
LC_NUMERIC: 'zh_CN.UTF-8',
LC_PAPER: 'zh_CN.UTF-8',
KDE_SESSION_UID: '1001',
KDE_MULTIHEAD: 'false',
GTK_RC_FILES: '/etc/gtk/gtkrc:/home/sgao/.gtkrc:/home/sgao/.config/gtkrc',
GTK2_RC_FILES:
'/etc/gtk-2.0/gtkrc:/home/sgao/.gtkrc-2.0:/home/sgao/.config/gtkrc-2.0',
SESSION_MANAGER:
'local/hy-System-Product-Name:@/tmp/.ICE-unix/3114,unix/hy-System-Product-Name:/tmp/.ICE-unix/3114',
DESKTOP_STARTUP_ID: 'hy-System-Product-Name;1567652884;801628;3191_TIME39603',
VSCODE_IPC_HOOK: '/run/user/1001/vscode-2c483866-1.38.0-main.sock',
VSCODE_NLS_CONFIG:
'{"locale":"en-us","availableLanguages":{},"_languagePackSupport":true}',
VSCODE_LOGS: '/home/sgao/.config/Code/logs/20190905T110805',
CHROME_DESKTOP: 'code-url-handler.desktop',
GOPATH: '/home/sgao/Documents/Go/',
GOROOT: '/home/sgao/Documents/Apps/go',
LESSCLOSE: '/usr/bin/lesspipe %s %s',
LESSOPEN: '| /usr/bin/lesspipe %s',
LS_COLORS: '',
NODE_PATH: '/home/sgao/node/lib/node_modules:',
NO_AT_BRIDGE: '1',
NPM_PACKAGES: '/home/sgao/node',
VSCODE_NODE_CACHED_DATA_DIR:
'/home/sgao/.config/Code/CachedData/3db7e09f3b61f915d03bbfa58e258d6eee843f35',
VSCODE_PID: '4091',
_: '/usr/share/code/code',
AMD_ENTRYPOINT: 'vs/workbench/services/extensions/node/extensionHostProcess',
PIPE_LOGGING: 'true',
VERBOSE_LOGGING: 'true',
VSCODE_IPC_HOOK_EXTHOST: '/tmp/vscode-ipc-91450c99-fe34-4ecf-8528-41c13c61f001.sock',
VSCODE_HANDLES_UNCAUGHT_ERRORS: 'true',
VSCODE_LOG_STACK: 'false',
VSCODE_PREVENT_FOREIGN_INSPECT: 'true',
ELECTRON_RUN_AS_NODE: '1',
APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL: 'true' },
'magic variable 🤦🏼': '39' }
[2019-09-05 06:28:37.161] [INFO] [at debug._mainTaskQueue.then (/home/sgao/.vscode/extensions/matepek.vscode-catch2-test-adapter-2.7.1/out/src/TestAdapter.js:321:23)] debugSessionStarted
[2019-09-05 06:28:37.964] [INFO] [at debug._mainTaskQueue.then.Promise.finally (/home/sgao/.vscode/extensions/matepek.vscode-catch2-test-adapter-2.7.1/out/src/TestAdapter.js:313:27)] debugSessionTerminated