Skip to content

"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

Description

  • 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

Activity

  1. AlanRosenthal commented on Jun 1, 2017

    @AlanRosenthal
    Author

    Confirmed this happens on 0.11.3 but not 0.11.2

  2. AlanRosenthal commented on Jun 1, 2017

    @AlanRosenthal
    Author
  3. pieandcakes commented on Jun 2, 2017

    @pieandcakes
    Contributor

    Alan Rosenthal (@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.

  4. AlanRosenthal commented on Jun 2, 2017

    @AlanRosenthal
    Author

    Pierson Lee (@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

  5. pieandcakes commented on Jun 2, 2017

    @pieandcakes
    Contributor

    Alan Rosenthal (@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?

  6. pieandcakes commented on Jun 2, 2017

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

  7. mbbill commented on Jun 2, 2017

    @mbbill

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

  8. AlanRosenthal commented on Jun 2, 2017

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

  9. AlanRosenthal commented on Jun 2, 2017

    @AlanRosenthal
    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}

  10. pieandcakes commented on Jun 2, 2017

    @pieandcakes
    Contributor

    Alan Rosenthal (@AlanRosenthal) thanks. That helps a lot.

  11. pieandcakes commented on Jun 2, 2017

    @pieandcakes
    Contributor

    Alan Rosenthal (@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

  12. AlanRosenthal commented on Jun 2, 2017

    @AlanRosenthal
    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 } } ] }

  13. 8 remaining items

  14. pieandcakes commented on Jun 2, 2017

    @pieandcakes
    Contributor

    Christof Marti (@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.

  15. chrmarti commented on Jun 2, 2017

    @chrmarti

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

  16. pieandcakes commented on Jun 2, 2017

    @pieandcakes
    Contributor

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

  17. AlanRosenthal commented on Jun 2, 2017

    @AlanRosenthal
    Author
  18. jayphelps commented on Jun 2, 2017

    @jayphelps

    Pierson Lee (@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
    
  19. pieandcakes commented on Jun 3, 2017

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

  20. endorph-soft commented on Oct 2, 2017

    @endorph-soft

    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.

  21. pieandcakes commented on Oct 2, 2017

    @pieandcakes
    Contributor

    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.

  22. endorph-soft commented on Oct 3, 2017

    @endorph-soft

    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?

  23. pieandcakes commented on Oct 3, 2017

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

  24. deruhu commented on Jan 16, 2018

    @deruhu

    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.

  25. bobbrow commented on Jan 16, 2018

    @bobbrow
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debuggerfixedCheck the Milestone for the release in which the fix is or will be available.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions