|Extension|Author|Version|
|---|---|---|
|code-gnu-global|austin|0.2.2|
|gitlens|eamodio|3.5.1|
|cpptools|ms-vscode|0.11.3|;

messageService.ts:125 Unable to start debugging. Launch options string provided by the project system is invalid. The type initializer for 'System.Xml.Serialization.XmlSerializationReader' threw an exception.
e.doShow @ messageService.ts:125
e.show @ messageService.ts:104
(anonymous) @ debugService.ts:843
v @ winjs.base.raw.js:1209
enter @ winjs.base.raw.js:901
_run @ winjs.base.raw.js:1068
_chainedError @ winjs.base.raw.js:1031
n @ winjs.base.raw.js:736
then @ winjs.base.raw.js:1436
enter @ winjs.base.raw.js:747
_run @ winjs.base.raw.js:1068
_setCompleteValue @ winjs.base.raw.js:1052
v @ winjs.base.raw.js:1209
enter @ winjs.base.raw.js:901
_run @ winjs.base.raw.js:1068
_error @ winjs.base.raw.js:1041
(anonymous) @ v8Protocol.ts:53
e.dispatch @ v8Protocol.ts:136
e.handleData @ v8Protocol.ts:104
(anonymous) @ v8Protocol.ts:41
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
Confirmed this happens on 0.11.3 but not 0.11.2
@AlanRosenthal Is this with Launch or attach? If you try stable with your project does it happen? I tried the scenario with my hello world app on Ubuntu 16-04 with Insiders and 0.11.3 and debugging works fine.
@pieandcakes: launch
vscode stable and insider both happen with cpptools v0.11.3.
Other people here (https://github.com/Microsoft/vscode/issues/27875) experiencing it as well.
FWIW I'm using arm-none-eabi-gdb-py not regular gdb
@AlanRosenthal Probably going to need more repro steps. Can you enable "logging": { "trace": true, "traceResponse": true, "engineLogging": true } and see if you get some more information in the output window?
Please also provide the version and type of gdb everyone is using. I am trying to reproduce this so I can find what the problem is. Also please provide a launch.json so I can try the same settings. Thanks
gdb on ubuntu 7.11.1
even the default launch.json generated by vscode won't work.
arm-none-eabi-gdb-py --version
GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20151217-cvs
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
I don't see any extra in the debug console:
Unable to start debugging. Launch options string provided by the project system is invalid. The type initializer for 'System.Xml.Serialization.XmlSerializationReader' threw an exception.
e.doShow @ messageService.ts:125
e.show @ messageService.ts:104
(anonymous) @ debugService.ts:843
v @ winjs.base.raw.js:1209
enter @ winjs.base.raw.js:901
_run @ winjs.base.raw.js:1068
_chainedError @ winjs.base.raw.js:1031
n @ winjs.base.raw.js:736
then @ winjs.base.raw.js:1436
enter @ winjs.base.raw.js:747
_run @ winjs.base.raw.js:1068
_setCompleteValue @ winjs.base.raw.js:1052
v @ winjs.base.raw.js:1209
enter @ winjs.base.raw.js:901
_run @ winjs.base.raw.js:1068
_error @ winjs.base.raw.js:1041
(anonymous) @ v8Protocol.ts:53
e.dispatch @ v8Protocol.ts:136
e.handleData @ v8Protocol.ts:104
(anonymous) @ v8Protocol.ts:41
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
|Extension|Author|Version|
|---|---|---|
|code-gnu-global|austin|0.2.2|
|gitlens|eamodio|3.5.1|
|cpptools|ms-vscode|0.11.3|;
Sorry was looking at the developer console - not the debug console
1: (320) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'
1: (335) LaunchOptions ExePath='/home/arosenthal/path/to/elf/file.elf'
1: (335) LaunchOptions WorkingDirectory='/home/arosenthal/path/to/gdb/scripts'
1: (335) LaunchOptions TargetArchitecture='arm'
1: (335) LaunchOptions ExeArguments=''
1: (335) LaunchOptions MIMode='gdb'
1: (335) LaunchOptions MIDebuggerPath='arm-none-eabi-gdb-py'
1: (335) LaunchOptions WaitDynamicLibLoad='false'
1: (335) LaunchOptions ExternalConsole='true'
1: (336) LaunchOptions>
1: (336) LaunchOptions <CustomLaunchSetupCommands>
1: (336) LaunchOptions <Command IgnoreFailures='false' Description='set working directory'>cd /home/arosenthal/path/to/gdb/scripts</Command>
1: (336) LaunchOptions <Command IgnoreFailures='false' Description='load ELF'>file path/to/elf/file.elf</Command>
1: (336) LaunchOptions <Command IgnoreFailures='false' Description='setup target'>source gdbinit.jlink</Command>
1: (336) LaunchOptions <Command IgnoreFailures='false' Description='setup default breakpoint'>tb Reset_Handler</Command>
1: (336) LaunchOptions </CustomLaunchSetupCommands>
1: (336) LaunchOptions <LaunchCompleteCommand>exec-continue</LaunchCompleteCommand>
1: (336) LaunchOptions</LocalLaunchOptions>
R: {"success":false,"message":"Unable to start debugging. Launch options string provided by the project system is invalid. The type initializer for 'System.Xml.Serialization.XmlSerializationReader' threw an exception.","request_seq":2,"command":"launch","body":{"error":{"id":1104,"format":"Unable to start debugging. Launch options string provided by the project system is invalid. The type initializer for 'System.Xml.Serialization.XmlSerializationReader' threw an exception.","variables":null}},"running":false,"refs":null,"seq":0,"type":"response"}
C disconnect: {"restart":false}
@AlanRosenthal thanks. That helps a lot.
@AlanRosenthal Would you be able to provide me your launch.json? If you don't want to share it publicly, can you email it to me? My email address is in my profile.
Thanks
{
"version": "0.2.0",
"configurations": [
{
"name": "buildname",
"type": "cppdbg",
"request": "launch",
"targetArchitecture": "arm",
"stopAtEntry": false,
"MIMode": "gdb",
"miDebuggerPath": "arm-none-eabi-gdb-py",
"program": "${workspaceRoot}/products/path/to/elf/file.elf",
"cwd": "${workspaceRoot}/products/gcc/gdb",
"externalConsole": true,
"customLaunchSetupCommands": [
{
"text": "cd ${workspaceRoot}/products/gcc/gdb",
"description": "set working directory",
"ignoreFailures": false
},
{
"text": "file ../../path/to/elf/file.elf",
"description": "load ELF",
"ignoreFailures": false
},
{
"text": "source gdbinit.jlink",
"description": "setup target",
"ignoreFailures": false
},
{
"text": "tb Reset_Handler",
"description": "setup default breakpoint",
"ignoreFailures": false
}
],
"launchCompleteCommand": "exec-continue",
"logging": { "trace": true, "traceResponse": true, "engineLogging": true }
}
]
}
Seeing this on Ubuntu 14.04, todays VSCode 1.13-insiders and ms-vscode.cpptools 0.11.3, gdb 7.7.1 and launch config: https://github.com/Microsoft/vscode/issues/18195#issuecomment-305862196
@AlanRosenthal Can you go to ~/.vscode/extensions/msvscode.cpptools-OpenDebugAD7.exe.config and try it to see if it works?
Looks like its working!
@AlanRosenthal Thanks. It was a file added for windows, but for some reason on some versions of mono on Linux it doesn't understand the file. It took me 3 machines to get a repro here. I will make an update to rename the file on non-windows machines to fix the scenario.
In the meantime, the work around is:
Remove the OpenDebugAD7.exe.config file in ~/.vscode/extensions/msvscode.cpptools-<version>/debugAdapters/bin
(or ~/.vscode-insiders/extensions/msvscode.cpptools-<version>/debugAdapters/bin for Insiders)
I don't see that file, I only see the 0.11.2 folder (no 0.11.3 which I have installed):

@chrmarti Due to a manual edit of the package.json version number to 0.11.3, the folder it creates is 0.11.2 still, but everything else should be okay.
@chrmarti if you have one in the 0.11.2 folder location, try and remove it and it should work. There was an issue with the last extension release where the version number was manually edited but might not have been done correctly.
@pieandcakes The file is not there, only those shown in the above screenshot.
@chrmarti you are in the wrong folder. Its <extension>\debugAdapters\bin not <extension>\bin like you have above.
Debug adapters
On Fri, Jun 2, 2017, 7:08 PM Christof Marti notifications@github.com
wrote:
I don't see that file, I only see the 0.11.2 folder (no 0.11.3 which I
have installed):
[image: screen shot 2017-06-02 at 3 39 39 pm]
https://cloud.githubusercontent.com/assets/9205389/26747359/13e54adc-47aa-11e7-8d12-d66433b5e1e4.png—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode-cpptools/issues/792#issuecomment-305925393,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABOqwQV4mmwXD-pZzIe3zwsY-kyIcBZpks5sAI_dgaJpZM4NteVz
.
@pieandcakes had same problem on Mac OS, your solution worked for me!
rm ~/.vscode/extensions/ms-vscode.cpptools-0.11.2/debugAdapters/bin/OpenDebugAD7.exe.config
# then restart vscode
Thank you everyone. Version 0.11.4 has been published and this should be resolved. Please open new issues if you are still having problems.
You seem to have this issue again under 0.13.0. I deleted the aforementioned file, and all is now well.
I'm running under Ubuntu 16.04.
@endorph-soft Can you verify that you have OpenDebugAD7.exe.config.unused under ~/.vscode/extensions/ms-vscode.cpptools-0.13.0/debugAdapters/bin/ ? I just downloaded the extension on Ubuntu 16.04 and I can't duplicate this.
I create a clean Ubuntu machine, installed VSCode, installed the 0.13.0 of the extension and reloaded it per the UI and it looks like I have the .unused file as expected.
I had both of them.
I'm using an offline installation, so I originally installed the extension on another machine. I then copied the extension folder to the other machine. This copied folder only contained OpenDebugAD7.exe.config.unused. However, OpenDebugAD7.exe.config seems to have been generated afterwards.
It may just be weirdness caused by the unconventional installation method?
@endorph-soft Possibly weirdness with offline installation. When the extension is downloaded it is named OpenDebugAD7.exe.config and during the first activation, we attempt to rename it OpenDebugAD7.exe.config.unused if you are not running on Windows OS. I don't know how you got into a state where both files are there.
I tried the offline installation with the latest installers yesterday and the file has not been renamed on my machine (Ubuntu 16.04), so the bug seem to persist in the offline installation packages.
Only the Win32 offline installation package includes that file. I thought it would be silly to package in a file that would immediately need to be removed or renamed, so I simply didn't include it for the Mac/Linux versions. The reason it exists in the online version is because we don't maintain duplicate download packages for each platform.
Most helpful comment
Thank you everyone. Version
0.11.4has been published and this should be resolved. Please open new issues if you are still having problems.