Vscode-cpptools: Debbuger error: MIEngine-cmd: syntax error: "(" unexpected on debugger launch.

Created on 9 Feb 2019  路  6Comments  路  Source: microsoft/vscode-cpptools

Description

  • OS and Version: Ubuntu 18.10
  • VS Code Version: 1.30.2
  • C/C++ Extension Version: 0.21.0
  • Other extensions you installed (and if the issue persists after disabling them): C#
  • After successful compilation to "a.out" with g++, launching the debugger through VSCode results in a terminal started with the error:
/tmp/Microsoft-MIEngine-Cmd-5m457rje.10m: 1: /tmp/Microsoft-MIEngine-Cmd-5m457rje.10m: Syntax error: "(" unexpected
bug debugger

Most helpful comment

Ok. i think the problem is that the path in the command temp file, you have the code on has a ' in the path and we aren't handing that correctly.
cd /media/guglev/Z (1,8TB)/ProgrammingProjects/- School/AlGOritmi/Week1

@WardenGnaw can you take a look at this? I think we are missing some quotes and/or escapes. The pastebin above with the file contents should show you what @wrightwriter is getting.

All 6 comments

What do you have externalConsole set to? Can you try and reinstall the extension?

What do you have externalConsole set to? Can you try and reinstall the extension?

Where can I access the externalConsole setting ?

@wrightwriter in your launch.json.

@pieandcakes
Here are my config files - https://pastebin.com/AC8HmY48 .
Changing externalConsole to false has no effect.
Disabling all extensions and reinstalling C++ extension also does not change the error.

Terminal log is env sh /tmp/Microsoft-MIEngine-Cmd-mzkf2e1l.5qe

/tmp/Microsoft-MIEngine-Cmd-mzkf2e1l.5qe: 1: /tmp/Microsoft-MIEngine-Cmd-mzkf2e1l.5qe: Syntax error: "(" unexpected

Here are the contents of the /tmp/Microsoft-MIEngine-Cmd-mzkf2e1l.5qe file: https://pastebin.com/J3jnBjNV

Ok. i think the problem is that the path in the command temp file, you have the code on has a ' in the path and we aren't handing that correctly.
cd /media/guglev/Z (1,8TB)/ProgrammingProjects/- School/AlGOritmi/Week1

@WardenGnaw can you take a look at this? I think we are missing some quotes and/or escapes. The pastebin above with the file contents should show you what @wrightwriter is getting.

Nice! It's working. The error stems from having "(" and/or ")" characters in the path name.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ismadelgad11 picture ismadelgad11  路  3Comments

igorPhelype picture igorPhelype  路  3Comments

SkyRiderMike picture SkyRiderMike  路  3Comments

montery8 picture montery8  路  3Comments

peterwoods1 picture peterwoods1  路  3Comments