Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"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" when debugging #792

Closed
AlanRosenthal opened this issue Jun 1, 2017 · 30 comments
Assignees
Labels
debugger fixed Check the Milestone for the release in which the fix is or will be available.
Milestone

Comments

@AlanRosenthal
Copy link

  • VSCode Version: Code - Insiders 1.13.0-insider (64d532ccb681ddbef0039db1effa2949f1993214, 2017-06-01T05:39:58.303Z)
  • OS Version: Linux x64 4.8.0-53-generic
  • Extensions:
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

@AlanRosenthal
Copy link
Author

Confirmed this happens on 0.11.3 but not 0.11.2

@AlanRosenthal
Copy link
Author

Clone: microsoft/vscode#27875

@pieandcakes
Copy link
Contributor

pieandcakes commented Jun 2, 2017

@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 pieandcakes self-assigned this Jun 2, 2017
@pieandcakes pieandcakes added debugger more info needed The issue report is not actionable in its current state labels Jun 2, 2017
@AlanRosenthal
Copy link
Author

@pieandcakes: launch
vscode stable and insider both happen with cpptools v0.11.3.
Other people here (microsoft/vscode#27875) experiencing it as well.

FWIW I'm using arm-none-eabi-gdb-py not regular gdb

@pieandcakes
Copy link
Contributor

@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?

@pieandcakes
Copy link
Contributor

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

@mbbill
Copy link

mbbill commented Jun 2, 2017

gdb on ubuntu 7.11.1
even the default launch.json generated by vscode won't work.

@AlanRosenthal
Copy link
Author

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

  • VSCode Version: Code - Insiders 1.13.0-insider (64d532ccb681ddbef0039db1effa2949f1993214, 2017-06-01T05:39:58.303Z)
  • OS Version: Linux x64 4.8.0-53-generic
  • Extensions:
Extension Author Version
code-gnu-global austin 0.2.2
gitlens eamodio 3.5.1
cpptools ms-vscode 0.11.3

@AlanRosenthal
Copy link
Author

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}

@pieandcakes
Copy link
Contributor

@AlanRosenthal thanks. That helps a lot.

@pieandcakes
Copy link
Contributor

@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

@AlanRosenthal
Copy link
Author

{ "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 } } ] }

@chrmarti
Copy link

chrmarti commented Jun 2, 2017

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: microsoft/vscode#18195 (comment)

@pieandcakes
Copy link
Contributor

@AlanRosenthal Can you go to ~/.vscode/extensions/msvscode.cpptools-/debugAdapters/bin and remove the file OpenDebugAD7.exe.config and try it to see if it works?

@AlanRosenthal
Copy link
Author

Looks like its working!

@pieandcakes
Copy link
Contributor

pieandcakes commented Jun 2, 2017

@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)

@pieandcakes pieandcakes added fixed Check the Milestone for the release in which the fix is or will be available. and removed more info needed The issue report is not actionable in its current state labels Jun 2, 2017
@chrmarti
Copy link

chrmarti commented Jun 2, 2017

I don't see that file, I only see the 0.11.2 folder (no 0.11.3 which I have installed):
screen shot 2017-06-02 at 3 39 39 pm

@sean-mcmanus
Copy link
Contributor

@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.

@pieandcakes
Copy link
Contributor

@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.

@chrmarti
Copy link

chrmarti commented Jun 2, 2017

@pieandcakes The file is not there, only those shown in the above screenshot.

@pieandcakes
Copy link
Contributor

@chrmarti you are in the wrong folder. Its <extension>\debugAdapters\bin not <extension>\bin like you have above.

@AlanRosenthal
Copy link
Author

AlanRosenthal commented Jun 2, 2017 via email

@jayphelps
Copy link

@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

@pieandcakes
Copy link
Contributor

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.

@endorph-soft
Copy link

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.

@pieandcakes
Copy link
Contributor

pieandcakes commented Oct 2, 2017

@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.

@endorph-soft
Copy link

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?

@pieandcakes
Copy link
Contributor

@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.

@deruhu
Copy link

deruhu commented Jan 16, 2018

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.

@bobbrow
Copy link
Member

bobbrow commented Jan 16, 2018

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.

asialasr pushed a commit to asialasr/vscode-cpptools that referenced this issue Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugger fixed Check the Milestone for the release in which the fix is or will be available.
Projects
None yet
Development

No branches or pull requests

9 participants