Skip to content

Update Debugger Packages#8021

Merged
WardenGnaw merged 2 commits intomainfrom
dev/waan/updateDebuggerPackagesForRelease
Aug 23, 2021
Merged

Update Debugger Packages#8021
WardenGnaw merged 2 commits intomainfrom
dev/waan/updateDebuggerPackagesForRelease

Conversation

@WardenGnaw
Copy link
Member

Fixes #8008

@homfunc
Copy link

homfunc commented Aug 22, 2021

I am sorry to report that including the osxlauncherhelper.scpt from this repo did not help with debugging the example from Configure VS Code for Clang/LLVM on macOS. I arrived here from #8008

I am

  • on macOS Big Sur Version 11.5.2
  • running VS Code Insiders 1.60
  • C/C++ Extension v1.6.0-insiders3
  • osxlauncherhelper.scpt is here
    • -rw-r--r--@ 1 mr_anon staff 1.1K 22 Aug 16:38 .vscode-insiders/extensions/ms-vscode.cpptools-1.6.0-insiders3/debugAdapters/bin/osxlaunchhelper.scpt

clicking the "clang++ - Build and debug active file" launch configuration builds the helloworld.cpp fine but the debugger never starts. I have turned logging on in launch.json for that configuration but get no output...

Here are is the output from the C/C++ extension (Debug level) when clicking build and debug

IntelliSense Engine = Default.
Enhanced Colorization is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Autocomplete is enabled.
$/setTraceNotification
Launch configuration:
{
  "name": "clang++ - Build and debug active file",
  "type": "cppdbg",
  "request": "launch",
  "program": "/Users/mr_anon/Documents/vscode projects/insiders-test/helloworld",
  "args": [],
  "stopAtEntry": true,
  "cwd": "/Users/mr_anon/Documents/vscode projects/insiders-test",
  "environment": [],
  "externalConsole": true,
  "MIMode": "lldb",
  "preLaunchTask": "C/C++: clang++ build active file",
  "logging": {
    "trace": true,
    "traceResponse": true,
    "engineLogging": true
  },
  "__configurationTarget": 5
}

Here is the terminal output from the build preLaunchTask:

> Executing task: C/C++: clang++ build active file <

Starting build...
/usr/bin/clang++ -std=c++17 -stdlib=libc++ -g "/Users/mr_anon/Documents/vscode projects/insiders-test/helloworld.cpp" -o "/Users/mr_anon/Documents/vscode projects/insiders-test/helloworld"
Build finished successfully.

Terminal will be reused by tasks, press any key to close it.

It seems to be something to do with the parsing of the configuration in the launch.json file as when I change the value of the externalConsole value to true (from false) I get the following in the Log (Extension Host)

[2021-08-22 23:41:53.051] [exthost] [error] SyntaxError: Unexpected token t
	at unexpected (/Users/mr_anon/.vscode-insiders/extensions/ms-vscode.cpptools-1.6.0-insiders3/dist/main.js:11948:17)
	at expect (/Users/mr_anon/.vscode-insiders/extensions/ms-vscode.cpptools-1.6.0-insiders3/dist/main.js:11993:5)
	at parse_object (/Users/mr_anon/.vscode-insiders/extensions/ms-vscode.cpptools-1.6.0-insiders3/dist/main.js:12109:7)
	at walk (/Users/mr_anon/.vscode-insiders/extensions/ms-vscode.cpptools-1.6.0-insiders3/dist/main.js:12216:12)
	at parse_array (/Users/mr_anon/.vscode-insiders/extensions/ms-vscode.cpptools-1.6.0-insiders3/dist/main.js:12191:29)
	at walk (/Users/mr_anon/.vscode-insiders/extensions/ms-vscode.cpptools-1.6.0-insiders3/dist/main.js:12221:12)
	at parse_object (/Users/mr_anon/.vscode-insiders/extensions/ms-vscode.cpptools-1.6.0-insiders3/dist/main.js:12141:33)
	at walk (/Users/mr_anon/.vscode-insiders/extensions/ms-vscode.cpptools-1.6.0-insiders3/dist/main.js:12216:12)
	at Object.parse (/Users/mr_anon/.vscode-insiders/extensions/ms-vscode.cpptools-1.6.0-insiders3/dist/main.js:12268:16)
	at ConfigurationSnippetProvider.provideCompletionItems (/Users/mr_anon/.vscode-insiders/extensions/ms-vscode.cpptools-1.6.0-insiders3/dist/main.js:39068:39)
	at H.provideCompletionItems (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:176927)
	at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:197403
	at xe._withAdapter (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:187477)
	at xe.$provideCompletionItems (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:197379)
	at i._doInvokeHandler (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:98:13543)
	at i._invokeHandler (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:98:13227)
	at i._receiveRequest (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:98:11838)
	at i._receiveOneMessage (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:98:10567)
	at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:98:8663
	at d.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:66:1712)
	at a.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:74:15781)
	at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:30187
	at d.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:66:1712)
	at a.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:74:15781)
	at r._receiveMessage (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:74:21047)
	at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:74:17925
	at d.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:66:1712)
	at p.acceptChunk (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:74:13142)
	at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:74:12490
	at Socket.w (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:13350)
	at Socket.emit (events.js:315:20)
	at addChunk (internal/streams/readable.js:309:12)
	at readableAddChunk (internal/streams/readable.js:284:9)
	at Socket.Readable.push (internal/streams/readable.js:223:10)
	at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)

and, tellingly, if I put false in there the error message becomes SyntaxError: Unexpected token f or SyntaxError: Unexpected token x if I put x as the value.

Hope that helps.

@WardenGnaw
Copy link
Member Author

@hughan Your issue seems very different from the one described in #8008. #8008 was able to start debugging but there as nothing in the output window. From your callstack, it seems to be failing in the extension code, not the debugger.

Can you open a new issue?

@WardenGnaw WardenGnaw merged commit ccfc40a into main Aug 23, 2021
@homfunc
Copy link

homfunc commented Aug 26, 2021

Can you open a new issue?

I went to open a new issue but found that the latest version of the extension 1.6.0 manages to start the debugger.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2021
@bobbrow bobbrow deleted the dev/waan/updateDebuggerPackagesForRelease branch February 10, 2022 21:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MacOS unable to use external terminal to debug

3 participants