question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

preLaunchTask to build using cmaketools in settings.json

See original GitHub issue

I’ve tried using a build task but I couldnt get it to work. Is there any way to do this currently?

{
	// Use IntelliSense to learn about possible attributes.
	// Hover to view descriptions of existing attributes.
	// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
	"version": "0.2.0",
	"configurations": [
		{
			"name": "RelWithDebug",
			"type": "cppvsdbg",
			"request": "launch",
			"program": "${workspaceFolder}/Program/Etterna-release-symbols.exe",
			"args": [],
			"stopAtEntry": false,
			"cwd": "${workspaceFolder}",
			"environment": [],
			"externalConsole": true
		},
		{
			"name": "Release",
			"type": "cppvsdbg",
			"request": "launch",
			"program": "${workspaceFolder}/Program/Etterna.exe",
			"args": [],
			"stopAtEntry": false,
			"cwd": "${workspaceFolder}",
			"environment": [],
			"externalConsole": true
		}
	]
}

This is what i currently have for settings.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:16
  • Comments:23 (9 by maintainers)

github_iconTop GitHub Comments

19reactions
HOYScommented, Mar 27, 2019

+1 For this option!

2reactions
andreeiscommented, May 6, 2020

If you are using the CMake Tools debug feature (via the status bar or the command), a build will be triggered by an out of date state. If you use a launch.json then no.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Target Debugging and Launching — CMake Tools 1.4.0 ...
By default, the launch or debug of an executable target will cause it to be built. Note. The build on launch can be...
Read more >
VSCode make launch configuration fail if preLaunchTask fails
I had the same problem with a cmake task. I've solved it by changing task's type to shell and passing everything else in...
Read more >
vscode-cmake-tools/support - Gitter
In the settings.json I have a line: "C_Cpp.default. ... If I build the vscode-cmake-tools package from git. How I can install it in...
Read more >
Using C++ on Linux in VS Code
Next install the GNU compiler tools and the GDB debugger with this command: ... tasks.json (compiler build settings); launch.json (debugger settings) ...
Read more >
Customize build debug tasks with JSON files - Visual Studio ...
If the codebase uses custom build tools that Visual Studio doesn't recognize, you need to provide some configuration details to run and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found