microsoft / microsoft/vscode-cpptools

[Windows][Visual C++] Debugger hangs after launch

Open
#530 24 comments 1 reaction 1 assignee View on GitHub

@pieandcakes is already working on this.

Since Mar 6, 2017.

debugger
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Hello,
I'm trying to integrate my own cmake build wrapper with the C/C++ extension (https://github.com/floooh/fips), this calls "cmake --build" to build executable targets (which on Windows calls the Visual Studio build system). I have the Visual Studio 2015 Community Edition installed which provides the compiler.

When trying to debug the executable targets which have been built like this, I get the message:

--------------------------------------------------------------------------------
You may only use the C/C++ Extension for Visual Studio Code with Visual Studio
Code, Visual Studio or Xamarin Studio software to help you develop and test your
applications.
--------------------------------------------------------------------------------

...and the debugger appears to hang. The launch.json config looks good to me (the executable path is alright, the executable exists at that location (along with an .ilk and .pdb file), and the executable is also working when starting it manually, also if I intentionally put a non-existing exe into the launch.json config I explicitly get an error message about a missing file, so I guess it's not just a simple typo.

One launch.json entry looks like this (I generate the launch.json and tasks.json files from information provided by cmake):

  {
   "name":"Triangle",
   "type":"cppvsdbg",
   "request":"launch",
   "program":"C:/projects/fips-deploy/oryol/win64-vscode-debug/Triangle.exe",
   "stopAtEntry":true,
   "cwd":"C:/projects/fips-deploy/oryol/win64-vscode-debug",
   "environment":[],
   "externalConsole":false
  },

What am I doing wrong? Is there a way to get better logging output or is there another way to get to the bottom of the problem?

Debugging works fine on Linux (via gdb) and OSX (via lldb), only Windows is causing me trouble :)

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.