most recent 30 from stackoverflow.com2026-01-01T11:23:31Zhttps://stackoverflow.com/feeds/tag?tagnames=vscode-debuggerhttps://creativecommons.org/licenses/by-sa/4.0/rdfhttps://stackoverflow.com/q/798550200Monero Jeannitonhttps://stackoverflow.com/users/21220962025-12-25T20:14:49Z2025-12-25T20:14:49Z
<p>I am having hard time while trying to debug a Node.JS app with the visual interface of VS Code. Firebase studio has only the option to "Install additional debuggers..."
The option to "Install additional debuggers..." typically appears when the necessary debugger component for a specific project type (e.g. JavaScript, C#, Python, C++) is not installed or configured correctly in a IDE, such as Visual Studio Code (VS Code) or potentially an integrated Firebase Studio environment</p>
<p>Can anybody help me debug this Node.JS project?</p>
<p><a href="https://i.sstatic.net/3GZJs8tl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3GZJs8tl.png" alt="enter image description here" /></a></p>
https://stackoverflow.com/q/798544211K.Oshttps://stackoverflow.com/users/54343462025-12-24T14:30:47Z2025-12-25T04:25:07Z
<p>I am trying to figure it out why while debugging in Visual Studio Code the first template Flutter app the debugger is not catching the instruction:</p>
<pre class="lang-dart prettyprint-override"><code>_counter++;
</code></pre>
<p>or</p>
<pre class="lang-dart prettyprint-override"><code>_counter--;
</code></pre>
<p>Here, I am attaching the debugging process, I am expecting the debugger to hold breakpoint on every line that I have selected breakpoint. The breakpoint only activates on line 64. It does not activates on line 63 and 65, why is that?</p>
<p><a href="https://i.sstatic.net/zwVUCa5n.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/zwVUCa5n.png" alt="enter image description here" /></a></p>
<p>The issue only occurs when running program in Google Chrome (web app). It does not occur when running on android emulator.
In addition, the same program in Android Studio while debugging the debugger holds on line 62, 63, 64 and 65 while running in Google Chrome</p>
https://stackoverflow.com/q/655988811anotherOnehttps://stackoverflow.com/users/141706862021-01-06T15:45:56Z2025-12-21T20:04:50Z
<p>I installed VSC and wrote this program</p>
<pre><code>#include <stdio.h>
int main( void )
{
printf("Hello world!");
}
</code></pre>
<p>Then I installed a C/C++ debugger and I saved the file on the desktop as "hello.c" and magically the syntax became higlighted.</p>
<p>Now I would like to run the program, but can't find a way.<br />
There's no "run" or "build" option anywhere, and if I start the debugging and choose the debugger then I got a new tab named "settings.json" with a couple of brackets waiting for me to write something.</p>
<p>Also in the left I can read that I "have not yet opened a folder". What does it even mean?</p>
<p>And the line <code>#include <stdio.h></code> is underlined in red, like there's something wrong going on, maybe I have to download the library?</p>
<p>I would do anything to see the output of the program, please help me.</p>
https://stackoverflow.com/q/7648441710agustinvacahttps://stackoverflow.com/users/148375602023-06-15T18:07:22Z2025-12-19T14:38:42Z
<p>I have hardware available through my university <a href="https://en.wikipedia.org/wiki/Jump_server" rel="nofollow noreferrer">jump host</a>, to which I connect to through ssh:</p>
<pre class="lang-bash prettyprint-override"><code>$ ssh username@login.university.edu
Password: *******
$ ssh hardware1
Password: *******
</code></pre>
<p><code>[my_computer] --> [login.university.edu] --> [hardware1]</code></p>
<hr />
<p>I can get a window to <code>login.university.edu</code> with VSCode Remote SSH Connect to Host, but then once there I use the terminal to SSH into <code>hardware1</code>, therefore I can't use the debugger on <code>hardware1</code>.</p>
<p>How could I get a window to <code>hardware1</code>? Or else how can I customize <code>launch.json</code> in order to run <code>ssh hardware1</code> and input my password?</p>
https://stackoverflow.com/q/7978850218newbiehttps://stackoverflow.com/users/173486782025-10-12T10:14:23Z2025-12-15T09:45:29Z
<p>I use Python 3.11.1 and Jupyter Notebook to run code selections or lines in the Interactive Window for debugging or coding purposes.</p>
<p>A few days ago, everything was working fine, and I didn't have any issues running my code. However, after being away for two days, when I opened my project again and tried to run my code starting with importing pandas in the Interactive Window, it kept getting stuck at "Connecting to kernel".</p>
<p>I’ve already performed a clean uninstall and reinstalled Visual Studio Code, Jupyter, and Python, but the issue remains the same. Could this problem be caused by the September 2025 Visual Studio Code update (version 1.105), released on October 9th, 2025?</p>
<p><img src="https://i.sstatic.net/WBL5m5wX.png" alt="Enter image description here" /></p>
https://stackoverflow.com/q/798470771federico1234991https://stackoverflow.com/users/319311422025-12-14T14:21:52Z2025-12-14T22:55:57Z
<p>I am getting the following error (debugger output) when i try to do "ST_LINK: attach to application" in vscode. I have no idea what is going on. Any help is greatly appreciated.</p>
<p>I use WSL ubuntu 22.04.</p>
<p>My version of vscode is1.107.0 (user setup).</p>
<pre><code>Cortex-Debug: VSCode debugger extension version 1.12.1 git(652d042). Usage info: https://github.com/Marus/cortex-debug#usage
"configuration": {
"name": "ST-Link: Attach to Application",
"cwd": "/home/federico/bare-metal-series/app",
"executable": "/home/federico/bare-metal-series/app/firmware.elf",
"servertype": "stutil",
"request": "attach",
"type": "cortex-debug",
"device": "STM32F401RE",
"runToEntryPoint": "main",
"interface": "swd",
"showDevDebugOutput": "raw",
"armToolchainPath": "/opt/gcc-arm-none-eabi/bin",
"__configurationTarget": 6,
"gdbServerConsolePort": 55878,
"pvtAvoidPorts": [],
"chainedConfigurations": {
"enabled": false
},
"debuggerArgs": [],
"swoConfig": {
"enabled": false,
"decoders": [],
"cpuFrequency": 0,
"swoFrequency": 0,
"source": "probe"
},
"rttConfig": {
"enabled": false,
"decoders": []
},
"graphConfig": [],
"preLaunchCommands": [],
"postLaunchCommands": [],
"preAttachCommands": [],
"postAttachCommands": [],
"preRestartCommands": [],
"postRestartCommands": [],
"preResetCommands": [],
"postResetCommands": [],
"toolchainPath": "/opt/gcc-arm-none-eabi/bin",
"toolchainPrefix": "arm-none-eabi",
"extensionPath": "/home/federico/.vscode-server/extensions/marus25.cortex-debug-1.12.1",
"registerUseNaturalFormat": true,
"variableUseNaturalFormat": true,
"pvtVersion": "1.12.1",
"__sessionId": "1b5c4f93-51d1-4784-b53d-5821e9169153",
"pvtShowDevDebugOutput": "raw"
}
Reading symbols from /opt/gcc-arm-none-eabi/bin/arm-none-eabi-objdump --syms -C -h -w /home/federico/bare-metal-series/app/firmware.elf
Reading symbols from /opt/gcc-arm-none-eabi/bin/arm-none-eabi-nm --defined-only -S -l -C -p /home/federico/bare-metal-series/app/firmware.elf
Launching GDB: /opt/gcc-arm-none-eabi/bin/arm-none-eabi-gdb -q --interpreter=mi2
1-gdb-version
Launching gdb-server: st-util -p 50000 --no-reset
Please check TERMINAL tab (gdb-server) for output from st-util
Finished reading symbols from objdump: Time: 37 ms
Finished reading symbols from nm: Time: 52 ms
-> =thread-group-added,id="i1"
-> ~"GNU gdb (Arm GNU Toolchain 14.3.Rel1 (Build arm-14.174)) 15.2.90.20241229-git\n"
-> ~"Copyright (C) 2024 Free Software Foundation, Inc.\n"
-> ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
-> ~"\nType \"show copying\" and \"show warranty\" for details.\n"
-> ~"This GDB was configured as \"--host=x86_64-pc-linux-gnu --target=arm-none-eabi\".\n"
-> ~"Type \"show configuration\" for configuration details.\n"
-> ~"For bug reporting instructions, please see:\n"
-> ~"<https://bugs.linaro.org/>.\n"
-> ~"Find the GDB manual and other documentation resources online at:\n <"
-> ~"http://www.gnu.org/software/gdb/documentation/>.\n\n"
-> ~"For help, type \"help\".\n"
-> ~"Type \"apropos word\" to search for commands related to \"word\".\n"
-> 1^done
2-gdb-set mi-async on
-> 2^done
3-interpreter-exec console "set print demangle on"
-> 3^done
4-interpreter-exec console "set print asm-demangle on"
-> =cmd-param-changed,param="print asm-demangle",value="on"
-> 4^done
5-enable-pretty-printing
-> 5^done
6-interpreter-exec console "source /home/federico/.vscode-server/extensions/marus25.cortex-debug-1.12.1/support/gdbsupport.init"
-> 6^done
7-interpreter-exec console "source /home/federico/.vscode-server/extensions/marus25.cortex-debug-1.12.1/support/gdb-swo.init"
-> =cmd-param-changed,param="language",value="c"
-> =cmd-param-changed,param="language",value="auto"
-> 7^done
8-interpreter-exec console "set output-radix 0xa"
-> ~"Output radix now set to decimal 10, hex a, octal 12.\n"
Output radix now set to decimal 10, hex a, octal 12.
-> 8^done
9-interpreter-exec console "set input-radix 0xa"
-> ~"Input radix now set to decimal 10, hex a, octal 12.\n"
Input radix now set to decimal 10, hex a, octal 12.
-> 9^done
10-file-exec-and-symbols "/home/federico/bare-metal-series/app/firmware.elf"
-> 10^done
11-target-select extended-remote localhost:50000
-> =thread-group-started,id="i1",pid="42000"
-> =thread-created,id="1",group-id="i1"
-> ~"0x08000ac2 in ?? ()\n"
0x08000ac2 in ?? ()
-> *stopped,frame={addr="0x08000ac2",func="??",args=[],arch="armv7e-m"},thread-id="1",stopped-threads="all"
mi2.status = stopped
Program stopped, probably due to a reset and/or halt issued by debugger
-> 11^connected
12-interpreter-exec console "monitor halt"
-> 12^done
13-thread-list-ids
-> 13^done,thread-ids={thread-id="1"},current-thread-id="1",number-of-threads="1"
14-thread-info 1
-> 14^done,threads=[{id="1",target-id="Thread <main>",frame={level="0",addr="0x08000ac2",func="??",args=[],arch="armv7e-m"},state="stopped"}]
15-stack-list-frames --thread 1 0 19
-> 15^done,stack=[frame={level="0",addr="0x08000ac2",func="??",arch="armv7e-m"},frame={level="1",addr="0x08000abe",func="??",arch="armv7e-m"}]
16-stack-list-frames --thread 1 0 19
-> 16^done,stack=[frame={level="0",addr="0x08000ac2",func="??",arch="armv7e-m"},frame={level="1",addr="0x08000abe",func="??",arch="armv7e-m"}]
</code></pre>
<p>The code im trying to run is this one. It is about having a LED blink.</p>
<pre><code>#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#define LED_PORT (GPIOA)
#define LED_PIN (GPIO5)
static void rcc_setup(void) {
rcc_clock_setup_pll(&rcc_hsi_configs[RCC_CLOCK_3V3_84MHZ]);
}
static void gpio_setup(void) {
rcc_periph_clock_enable(RCC_GPIOA);
gpio_mode_setup(LED_PORT, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, LED_PIN);
}
static void delay_cycles(uint32_t cycles){
for(uint32_t i=0; i<cycles; i++){
__asm__("nop");
}
}
int main(void) {
rcc_setup();
gpio_setup();
while (1) {
gpio_toggle(LED_PORT, LED_PIN);
delay_cycles(84000000/4);
}
// Never return
return 0;
}
</code></pre>
<p>Launch.json file is the following:</p>
<pre><code>{
"configurations": [
{
"name": "ST-Link: Debug Application",
"cwd": "${workspaceFolder}/app",
"executable": "./firmware.elf",
"servertype": "stutil",
"request": "launch",
"type": "cortex-debug",
"device": "STM32F401RE",
"runToEntryPoint": "main",
"showDevDebugOutput": "raw",
"interface": "swd",
"preLaunchTask": "build_debug",
"armToolchainPath": "/opt/gcc-arm-none-eabi/bin"
},
{
"name": "ST-Link: Attach to Application",
"cwd": "${workspaceFolder}/app",
"executable": "./firmware.elf",
"servertype": "stutil",
"request": "attach",
"type": "cortex-debug",
"device": "STM32F401RE",
"runToEntryPoint": "main",
"interface": "swd",
"showDevDebugOutput": "raw",
"armToolchainPath": "/opt/gcc-arm-none-eabi/bin"
}
]
}
</code></pre>
<p>When i type st-util the board is recognized. Vscode recognizes the board.</p>
<p>Not sure what else to say. The toolchain seems right to me.</p>
<p>The file structure of my project is:</p>
<pre><code>bare-metal-series:
app:
src:
firmware.c
firmware.elf
firmware.map
firmware.bin
.vscode:
launch.json
libopencm3:
include:
libopencm3:
stm32:
rcc.h
gpio.h
</code></pre>
https://stackoverflow.com/q/795235292Vulumehttps://stackoverflow.com/users/138763052025-03-20T16:22:10Z2025-12-14T15:34:21Z
<p>I have the "Run and Debug" tab in the bottom panel, together with other tabs like "Terminal" and "Test results". When I debug a test from the test explorer, "Test results" pops open. If a breakpoint is hit, the relevant file opens in the editor, but "Test results" remains open doing nothing.</p>
<p>How do I get it to focus "Run and Debug" on break, so I can actually act on what's happening?</p>
https://stackoverflow.com/q/798004160di0nhttps://stackoverflow.com/users/140965252025-10-27T02:43:57Z2025-12-07T18:21:19Z
<p>I have my Expo project running on port 8081. I start it with the command:</p>
<pre><code>npx expo start
</code></pre>
<p>I open it on my phone using the Expo Go app (SDK 52).</p>
<p>I’m trying to set up debugging in VS Code using Microsoft’s React Native Tools extension.</p>
<p>My .vscode/launch.json file looks like this:</p>
<pre><code>{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Hermes application",
"request": "attach",
"type": "reactnativedirect",
"cwd": "${workspaceFolder}"
},
{
"name": "Debug in Exponent (LAN)",
"request": "launch",
"type": "reactnative",
"platform": "exponent",
"cwd": "${workspaceFolder}",
"expoHostType": "lan"
}
]
}
</code></pre>
<p>However, whenever I try to connect the debugger in VS Code, I always get:</p>
<pre><code>Launching the application
Getting app.json path: c:/animalzap/client/react_native/app.json
Start parsing .json file...
An error occurred while launching the application. spawn EINVAL (error code 303)
</code></pre>
<p>any help? :(</p>
https://stackoverflow.com/q/6024739815Adam Dinglehttps://stackoverflow.com/users/40340702020-02-16T10:09:32Z2025-12-02T07:10:45Z
<p>I'm running Visual Studio Code 1.42.1 on Ubuntu 19.10, using the default C# extension version 1.21.11.</p>
<p>Whenever I launch a C# program using "Start Debugging", or even via "Run Without Debugging", I see this message in the output window:</p>
<pre class="lang-text prettyprint-override"><code>-------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
</code></pre>
<p>This message is annoying. Is there any way to disable it?</p>
https://stackoverflow.com/q/756223525ok_samhttps://stackoverflow.com/users/213227282023-03-03T01:14:51Z2025-12-01T16:39:03Z
<p>I am trying to debug a Chrome Extension in VS Code using 'Attach to Chrome' configuration. However, when I run the debugger, it throws an error: "Cannot connect to the target at localhost:9222: Could not connect to debug target at http://localhost:9222: Could not find any debuggable target".</p>
<p><a href="https://i.sstatic.net/Xp7HO.png" rel="nofollow noreferrer">screenshot of the error message</a></p>
<p>Here is my <code>launch.json</code>:</p>
<pre class="lang-json prettyprint-override"><code>{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Chrome",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}",
"url": "https://github.com/",
},
]
}
</code></pre>
<p>My manifest.json file includes the necessary content script and background script:</p>
<pre class="lang-json prettyprint-override"><code>{
"name": "Extension",
"description": "Some description",
"manifest_version": 3,
"version": "1.0",
"devtools_page": "devtools.html",
"content_scripts": [{
"matches": [
"http://*/*",
"https://*/*"
],
"run_at": "document_idle",
"js": [
"content_script.js"
]
}],
"background": {
"service_worker": "background.js"
},
"runtimeArgs": ["--load-extension=${workspaceFolder}"]
}
</code></pre>
<p>I have set the correct port number (9222) in my launch.json configuration file and enabled remote debugging in Chrome by running the following command in the terminal:</p>
<pre><code>/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
</code></pre>
<p>Any suggestions on how to resolve this issue?</p>
https://stackoverflow.com/q/784114281Hang Chenhttps://stackoverflow.com/users/28508152024-04-30T23:27:19Z2025-11-28T09:30:11Z
<p>After setting up Anaconda and VSCode on my new Mac and selecting my desired python interpreter (in this case called <code>lotteryfl</code>), it seems that a new terminal always starts with a base env activated on top of <code>lotteryfl</code>. This also applies when I try to start the debugger, so that my installed packages in <code>lotteryfl</code> cannot be found when being imported. How may I fix it so that only <code>lotteryfl</code> is activated?</p>
<p><a href="https://i.sstatic.net/3K61rpOl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3K61rpOl.png" alt="enter image description here" /></a></p>
https://stackoverflow.com/q/684485161SunnyNonsensehttps://stackoverflow.com/users/57597572021-07-20T01:10:29Z2025-11-23T18:04:25Z
<p>I'm very new to debugging. My whole programming "career" has been limited to inserting print statements to try to figure out why things aren't working the way I want them to. Now I'm trying to step through my Python code in Visual Studio Code, but when I try to step into the debugger, it jumps straight to the first exception (which is like 50 steps in to be clear).</p>
<p>I saw that there are debugging configurations, but surely I don't have to learn all about those just to step through the code. And I know you can set breakpoints, but I'd like to see each step for now. Is there something I'm missing? I was using IDLE to step through my somewhat simple function prior to trying VSCode, but all of the little tweaks made that way too slow. Thanks for any help you can provide.</p>
<p>As best I can tell, this is the configuration I'm using by default:</p>
<pre><code>{
// 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": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
</code></pre>
https://stackoverflow.com/q/794948591Anubhav Pandeyhttps://stackoverflow.com/users/71841722025-03-08T18:45:45Z2025-11-22T22:46:09Z
<p>While coding and running an extension in debug mode, I get the error mentioned in the title.</p>
<p><a href="https://i.sstatic.net/3GetrNlD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3GetrNlD.png" alt="enter image description here" /></a></p>
<p>Here is my <code>extension.js</code>:</p>
<pre class="lang-js prettyprint-override"><code>// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
const vscode = require('vscode');
// This method is called when your extension is activated
// Your extension is activated the very first time the command is executed
/**
* @param {vscode.ExtensionContext} context
*/
function getWebviewContent() {
return `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video Player</title>
</head>
<body>
<h1>Video Player</h1>
<video width="640" height="360" controls>
<source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</body>
</html>`;
}
function activate(context) {
// Use the console to output diagnostic information (console.log) and errors (console.error)
// This line of code will only be executed once when your extension is activated
console.log('Congratulations, your extension "YourApp" is now active!');
let disposable = vscode.commands.registerCommand('extension.openVideo', function () {
// Create and show a new webview
const panel = vscode.window.createWebviewPanel(
'videoView', // Identifies the type of the webview. Used internally
'Video Player', // Title of the panel displayed to the user
vscode.ViewColumn.One, // Editor column to show the new webview panel in.
{
enableScripts: true, // Enable JavaScript in the webview
retainContextWhenHidden: true // Keep the webview's state even when it's hidden
}
);
// Set the HTML content for the webview
panel.webview.html = getWebviewContent();
});
context.subscriptions.push(disposable);
}
// This method is called when your extension is deactivated
function deactivate() {}
module.exports = {
activate,
deactivate
}
</code></pre>
<p>This is my <code>package.json</code>:</p>
<pre class="lang-json prettyprint-override"><code>{
"name": "financenews",
"displayName": "FinanceNews",
"description": "",
"version": "0.0.1",
"engines": {
"vscode": "^1.98.0"
},
"categories": [
"Other"
],
"activationEvents":
[
"onView:videoView", "onCommand:extension.openVideo"
],
"main": "./extension.js",
"contributes": {
"commands": [{
"command": "financenews.helloWorld",
"title": "Hello World"
},
{
"command": "extension.openVideo",
"title": "Open Video"
}],
"viewsContainers": {
"activitybar": [
{
"id": "videoSidebar",
"title": "Video Sidebar",
"icon": "media/mario.svg"
}
]
},
"views": {
"videoSidebar": [
{
"id": "videoView",
"name": "Video Player"
}
]
}
},
"scripts": {
"lint": "eslint .",
"pretest": "npm run lint",
"test": "vscode-test"
},
"devDependencies": {
"@types/vscode": "^1.98.0",
"@types/mocha": "^10.0.10",
"@types/node": "20.x",
"eslint": "^9.21.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1"
}
}
</code></pre>
<p>I have tried the following things:</p>
<ol>
<li>Used 'explorer' instead of 'videoSidebar'</li>
<li>Tried creating a class for VideoWebView and then tried to place <code>getWebView()</code> as a function inside the class.</li>
<li>Tried loading a video from a directory instead of using <code>https://www.w3schools.com/html/mov_bbb.mp4</code> for source</li>
</ol>
https://stackoverflow.com/q/794537263superbadtunacanhttps://stackoverflow.com/users/263280802025-02-20T08:04:33Z2025-11-19T19:08:53Z
<p>I am receiving the "error: unknown option: --interpreter=mi" when trying to debug with lldb in VS Code on Mac for C++, Clang Compiler, and an OpenMP implementation. I am unable to debug because of it. Below is the launch.json then tasks.json</p>
<pre><code>{
"version": "0.2.0",
"configurations": [
{
"name": "Build with Clang and OpenMP",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/CS267/tom_2.1/build/openmp", // Path to compiled binary
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/CS267/tom_2.1/",
"environment": [],
"externalConsole": false,
"MIMode": "lldb", // Use LLDB for debugging
"setupCommands": [
{ "text": "-enable-pretty-printing", "description": "Enable pretty printing", "ignoreFailures": true }
],
"preLaunchTask": "Build with Clang and OpenMP",
"miDebuggerPath": "/usr/bin/lldb" // Path to LLDB on macOS
}
]
}
</code></pre>
<pre><code>{
"version": "2.0.0",
"tasks": [
{
"label": "Build with Clang and OpenMP",
"type": "shell",
"command": "cmake",
"args": [
"--build",
"${workspaceFolder}/CS267/tom_2.1/build"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": ["$gcc"],
"detail": "Generated task by debugging configuration."
}
]
}
</code></pre>
<p>I have tried editing the tasks.json and launch.json numerous times to no avail. Chat has not helped.</p>
https://stackoverflow.com/q/798041963Mazroghttps://stackoverflow.com/users/83121912025-10-29T20:26:10Z2025-11-03T08:28:56Z
<p>I would like to know if there exists any way to interact programmatically with the vs code debugger during a session.
Python would be ideal, but JS/TS could also work. For the langages being debugged (if relevant) would be C/C++ and Fortran.</p>
<p>My goal would be for instance to be able to dump some variables to a file with their values at different points of execution (like a trace), without having to alter the code or even detailing the structures myself (the debugger would allow this kind of 'reflection' for the structure, listing all the fields for me).</p>
<p>My current setup is working on Windows, targeting "cppvsdbg". I had left that point out because I was hoping to find a vscode-level solution, not caring so much about the backend: just query VS Code which already did the job of talking to the underlying debugger.</p>
https://stackoverflow.com/q/710660911Evox402https://stackoverflow.com/users/122849802022-02-10T13:37:14Z2025-10-31T13:05:45Z
<p>I'm currently trying to get a better understanding of the embedded toolchain by leaving the common out-of-the-box IDEs and create my own inside of Visual Studio Code.</p>
<p>With the help of some tutorials I managed to get my blinky LED project for an STM32L433 Nucleo board up and running.</p>
<p>The last step I had to do was implementing the debug functionality. As I only did this via an IDE in the past this part is a bit tricky for me.
Nonetheless I managed to get it work but I still have some problems of wrapping my head around what is actually going on.</p>
<p>Therefore I hope you guys can help me get a better understanding of this.</p>
<p>Im using Visual Studio Code with the C/C++ and Cortex-debug extensions. Hardwarewise I'm using a STM32L433 Nucleo-Board with the build in ST-Link debugger probe.</p>
<p>I created my project in VSC and created a launch.json for the debug settings, it looks like this:</p>
<pre><code>{
"version":"0.2.0",
"configurations": [
{
"name": "Cortex ST-Link",
"cwd": "${workspaceRoot}",
"executable": "./build/Test.elf",
"request": "launch",
"type": "cortex-debug",
"servertype": "stlink",
"stlinkPath": "D:/CubeIDE/STM32CubeIDE_1.8.0/.../bin/ST-LINK_gdbserver.exe",
"stm32cubeprogrammer": "D:/CubeProgrammer/bin",
"device": "STM32L433RC",
"configFiles": [
"interface/stlink.cfg",
"target/stm32l4x.cfg"
],
"svdFile": "STM32L4x3.svd"
},
{
"name": "Cortex Debug",
"cwd": "${workspaceRoot}",
"executable": "./build/Test.elf",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"device": "STM32L433RC",
"configFiles": [
"interface/stlink.cfg",
"target/stm32l4x.cfg"
],
"svdFile": "STM32L4x3.svd"
}
]
</code></pre>
<p>}</p>
<p>Both configurations work, I don't know if this is the right/professional way to do this but this is all I found from examples and the Cortex-debug documentation. If I did something wrong, please tell me what I should do differently.</p>
<p>What I learned thus far regarding Debugging is the following:</p>
<ol>
<li>I need a debugging probe that can communicate with the debug access port of my MCU.</li>
<li>I need a GDB server that handles communication between the debugger and my PC.</li>
<li>And I need a client tool that connects to the GDB server and gives me an interface to read and write debug instructions and informations.</li>
</ol>
<p>So lets start with the OpenOCD configuration.
The used debugger is the st-link from the nucleo board. My GDB server would be OpenOCD and my client is the arm-none-eabi-gdb utility if I get this right from the debug console.
I use the stlink.cfg to tell the server which debugger I use so it knows how to communicate with it.
Is this correct this far?</p>
<p>Next the ST-Link config.
Instead of OpenOCD I now use the ST-Link-GDB server. And for the client again the arm-none-eabi-gdb.
But when I start to execute it like this, the ST-Link-GDB server throws an error that it can't find the STCubeProgrammer utility.
So I also give the path to this utility and it works.
My question now is, what is the CubeProgrammers role in this chain? I obviously doesn't need an additional component with OpenOCD, so why do I need the CubeProgrammer?
I firstly thought that the CubeProgrammer is the client in this case but I can see that arm-none-eabi-gdb still gets called in this debug config.
Even ST's GDB <a href="https://www.st.com/content/ccc/resource/technical/document/user_manual/group1/de/c1/e6/3d/89/18/4c/90/DM00613038/files/DM00613038.pdf/jcr:content/translations/en.DM00613038.pdf" rel="nofollow noreferrer">userguide</a> only shows the server, debugger and client and no programmer in the overview...</p>
<p>Can someone help me understand what is going on behind the scene and what the role of the CubeProgrammer is? Or maybe point out if I have some false configuration/understanding in this matter?</p>
<p>Thanks in advance :)</p>
<p>Best regards</p>
<p>Evox402</p>
https://stackoverflow.com/q/661695571Sotiris Stamnashttps://stackoverflow.com/users/151965862021-02-12T09:48:17Z2025-10-31T05:07:20Z
<p>I am trying to get the debugger to work but I get the following error "Unable to start debugging. Not implemented.". I am a bit unsure on what that means let alone how to solve it.</p>
<p>My launch.json file looks like this:</p>
<pre><code>{
// 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": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "Assigment_1.C++",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"console": "externalTerminal"
}
]
}
</code></pre>
https://stackoverflow.com/q/793730752GDDhttps://stackoverflow.com/users/57210962025-01-21T02:50:19Z2025-10-28T23:53:29Z
<p>This is slowly driving me insane, but some inexplicable reason one of my workspaces in vscode has reverted the run button in the editor actions menu to run and debug, so every time I press it, it opens the debugger. I have tried everything I cannot find an option to just change it to run</p>
<p><a href="https://i.sstatic.net/2f6qQSxM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2f6qQSxM.png" alt="run and debug button" /></a></p>
<p>this is how it looks now ^</p>
<p><a href="https://i.sstatic.net/BH00G11z.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BH00G11z.png" alt="run button" /></a></p>
<p>How do i change it to this ^</p>
https://stackoverflow.com/q/747033220rob hinerhttps://stackoverflow.com/users/206958032022-12-06T13:28:31Z2025-10-22T23:16:36Z
<p>Whenever i try to debug it tells me
"launch: program c:filepath\build\debug\outdebug" does not exist</p>
<p>launch.json</p>
<pre><code>{
"version": "0.2.0",
"configurations": [
{
"name": "C/C++ Runner: Debug Session",
"type": "cppdbg",
"request": "launch",
"args": [],
"stopAtEntry": false,
"externalConsole": true,
"cwd": "c:/Users/name/CSC",
"program": "c:/Users/name/CSC/build/Debug/outDebug",
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
</code></pre>
<p>task.json</p>
<pre><code>{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\\MinGW\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
</code></pre>
<p>c_cpp_properties.json</p>
<pre><code>{
"configurations": [
{
"name": "windows-gcc-x86",
"includePath": [
"${workspaceFolder}/**"
],
"compilerPath": "C:/MinGW/bin/gcc.exe",
"cStandard": "${default}",
"cppStandard": "${default}",
"intelliSenseMode": "windows-gcc-x86",
"compilerArgs": [
""
]
}
],
"version": 4
}
</code></pre>
<p>I dont understand why i can run programs, but debugging gives me the errors. tried re-installing g++, same errors. Ive gone to the launch.json "program": "c:/Users/name/CSC/build/Debug/outDebug", file location and there is no build file much less a debug file so its being directed to a non-existent file location for some reason?</p>
https://stackoverflow.com/q/797943110Dennis https://stackoverflow.com/users/8269122025-10-19T14:03:35Z2025-10-19T15:37:26Z
<p>I have the following simple php test file:</p>
<pre><code><?php
$a = 1 ;
$debug = true ;
</code></pre>
<p>This file has two linked filenames: testa and testa.php</p>
<p>I have set both of these files with a breakpoint at the third line (<code>$debug = ....</code>)</p>
<p>If I now invoke <code>php testa.php</code>, the script stops at line 3 and a mouseover of line 1's <code>$a</code> will reveal the value of $a (which is of course 1 at that point).</p>
<p>But if I instead invoke <code>php testa</code>, the script stops at line 3 and a mouseover of line 1's <code>$a</code> reveals the attributes of <code>$a</code> (int, etc) - but <strong>not</strong> a value. However, if I type <code>$a</code> into the debug console, I get the expected value of 1. I can also see the <code>$a = 1</code> value in the Variables window, just not on mouseover.</p>
<p>Is VSCode actually, as it seems, functioning differently depending upon the <em>extension</em> of a filename? (I don't think VSCode should be enforcing rules about script naming standards. And, anyway, it seems weird that all other debug capabilities except this seem to work fine.)</p>
<p>If VSCode is doing that, is there a setting that I can use to control this?</p>
https://stackoverflow.com/q/657995046SS Shahhttps://stackoverflow.com/users/85195712021-01-19T21:03:14Z2025-10-18T07:30:08Z
<p>Just getting started with FastAPI, but running into issues with trying to get it to recognize breakpoints in the VSCode debugger. The strange thing is that it does successfully break on lines that are not contained within routes</p>
<p>Pulling directly from the tutorial: <a href="https://fastapi.tiangolo.com/tutorial/debugging/" rel="noreferrer">https://fastapi.tiangolo.com/tutorial/debugging/</a></p>
<pre><code>import uvicorn
from fastapi import FastAPI
app = FastAPI() # breakpoint here works on launching file
print('here') # breakpoint here works on launching file
@app.get("/")
def root():
a = "a" # breakpoint here does NOT work
b = "b" + a
return {"hello world": b} # returns data successfully
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=5002)
</code></pre>
<p>As commented above, the lines outside the routes work fine, and when I go to the address I get the data successfully, but the breakpoint within the route does not fire. Not sure what I'm missing here. Have tried various solutions from <a href="https://stackoverflow.com/questions/60205056/debug-fastapi-application-in-vscode">Debug FastAPI application in VSCode</a></p>
<p>I'm not sure if this makes a difference, but this is also running through the Remote-SSH extension on VSCode (my code is on a gcloud VM). Maybe this is contributing but again, the other breakpoints fire fine.</p>
<p>My launch.json:</p>
<pre><code>{
// 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": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
</code></pre>
<p>EDIT: Looks like it does work if I replace "def" with "async def", though I'm trying to get this to work with a SQLite DB and per this page: <a href="https://fastapi.tiangolo.com/tutorial/sql-databases/" rel="noreferrer">https://fastapi.tiangolo.com/tutorial/sql-databases/</a> it recommends using "def" by default (with options to configure to use async def). I'll need to look into the distinction some more.</p>
https://stackoverflow.com/q/796329341dan-gphhttps://stackoverflow.com/users/606202025-05-22T01:22:00Z2025-10-17T04:49:03Z
<p>I have written a cmdlet called <code>Select-Blah.ps1</code> that extract certain information from log files. The log files are sent to my cmdlet via the pipeline:</p>
<pre><code>PS> Get-Content log.txt | Select-Blah
</code></pre>
<p>How can I run the command above in the vscode debugger? Specifically, what launch configuration can I put into my launch.json file in vscode?</p>
https://stackoverflow.com/q/699368932itz4blitzhttps://stackoverflow.com/users/160492232021-11-12T01:24:05Z2025-10-16T23:01:48Z
<p>I'm working on a React app in VSCode that's running on localhost:3000. I can visit the app in the browser. If I try to do ctrl+c in the terminal, an empty line is written but the app is still accessible. I need to close the app for some changes I'm planning to make. What's the best way to do this?</p>
https://stackoverflow.com/q/672856564Christian Ledgardhttps://stackoverflow.com/users/117573032021-04-27T15:03:31Z2025-10-16T00:01:50Z
<p>I'm trying to run my program with GDB debugger. When I run it, I get a warning:</p>
<pre><code>GDB: Failed to set controlling terminal: Operation not permitted
</code></pre>
<p>That warning appears and disappears very fast in my terminal. I already check some <a href="https://stackoverflow.com/questions/2346919/warning-gdb-failed-to-set-controlling-terminal-operation-not-permitted">stackoverflow questions</a>, but since I'm running <strong>visual studio attached to my docker</strong> (remote-container), I'm unable to apply some recommendations.</p>
<p>When I try a brake-point in my code, GDB does not work, and the program executes ignoring GDB.</p>
<p>My lauch.json configuration:</p>
<pre class="lang-json prettyprint-override"><code>{
// 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": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/words",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
</code></pre>
<p>The dockerfile configuration where I'm running my program:</p>
<pre><code>FROM ubuntu:18.04
SHELL ["/bin/bash", "-c"]
RUN apt-get -y update
RUN apt-get install -y Linux-headers-generic build-essential gdb
COPY . /ejercicio
</code></pre>
https://stackoverflow.com/q/7087854527exanhttps://stackoverflow.com/users/104438172022-01-27T12:26:25Z2025-10-13T05:56:21Z
<p>I have recently started using VS code for Python development. I am unable to figure out how to launch an interactive terminal while debugging, with the program state loaded-in . For example, consider the following code,</p>
<pre><code>import numpy as np
A = np.array([1, 2, 3])
B = np.zeros()
C = A/B \\ <--- Breakpoint here
</code></pre>
<p>I want to set a breakpoint at <code>C = A/B</code> and as soon as the breakpoint hit, I want to launch an interactive terminal that holds the state of my program. So that I can play around with variables in the terminal.</p>
<p>This is simple and straightforward in other Python IDEs like Spyder and Pycharm. How do I do this with VS Code?</p>
https://stackoverflow.com/q/779365203zixiangcodehttps://stackoverflow.com/users/173496072024-02-04T16:06:04Z2025-10-10T00:41:56Z
<p>I debug the xv6 kernel in VS Code, but the debug console doesn't seem to support ANSI colors perfectly.I don't know how to make it display ANSI colors correctly.</p>
<p><strong>What my Debug Console shows:</strong></p>
<p><img src="https://i.sstatic.net/Gzxos.png" alt="What my Debug Console shows" /></p>
<p>I have tried to find a solution to the problem, and I have noticed that this problem was mentioned in an <a href="https://github.com/Microsoft/vscode/issues/21423" rel="nofollow noreferrer">issue</a> of VS Code, and the issue has been solved by PR. I feel that my problem is similar to what is described in this issue, but I have not been able to solve it.</p>
<p>I also tried this in PR, and when I debugged the ts program, the Debug Console seemed to work fine. However, when I debug a C/C++ program (xv6 kernel), ANSI colors are not displayed correctly.</p>
<p><strong>What my Debug Console shows when I tried to debug TypeScript file:</strong></p>
<p><img src="https://i.sstatic.net/EaLze.png" alt="What my Debug Console shows when I tried to debug TypeScript file" />.</p>
https://stackoverflow.com/q/79770514-1Dživo Jelićhttps://stackoverflow.com/users/16581102025-09-20T19:10:11Z2025-10-05T21:26:36Z
<p>I would like to know how to setup launch.json and tasks.json to close all relevant terminals after debugging session is stopped.</p>
<p>For example i run ASP.NET app and Stripe Webhook Listen in compound launch.json configuration.</p>
<p>But when i stop debugging stripe stays open and next time i run debugging it first asks me to stop stripe then i can restart it its so anoying.</p>
<p>I have added stopAll:true but that didnt help as well.</p>
<pre class="lang-json prettyprint-override"><code> "compounds": [
{
"name": "Launch With Stripe",
"configurations": ["Launch AspNet With Proxy", "Stripe"],
"stopAll": true,
"presentation": {
"hidden": false,
"group": "",
"order": 1
}
}
]
</code></pre>
<p>EDIT: added stripe tags maybe it is connected to the extension as well</p>
https://stackoverflow.com/q/776050492Sebastien Tardifhttps://stackoverflow.com/users/24714422023-12-05T09:24:08Z2025-10-03T13:48:19Z
<p>My teacher keep giving me Jupyter Notebook where the entire program is split to different cell for each class. The last cell, is the bootstrap code, creating an instance of the ~main class and calling a method on it.</p>
<p>I used Jupyter Notebook inside VS Code because the real Jupyter Notebook on a browser seems to be worst about debugging and code completion...</p>
<p>I don't find a way in VS Code to ask to debug the entire code, so that the code stop to any breakpoint set. The only workaround I found is to merge all the cells...</p>
<p>Without merging all the cells, if I debug the last cell with the bootstrap code, it will complain it doesn't find the class(es) because in different cell(s)...</p>
https://stackoverflow.com/q/797807310Роман Дузеевhttps://stackoverflow.com/users/84615632025-10-02T08:25:04Z2025-10-02T08:25:04Z
<p>GDB console works well with gdbserver, but via VSCode it doesn't stop at breakpoints</p>
<pre><code>"version": "0.2.0",
"configurations": [
{
"name": "(gdb) remoute",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/hello",
"cwd": "${workspaceFolder}",
"targetArchitecture": "arm64", // Or "AArch64"
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "${workspaceFolder}/tools/gdb/host/gdb",
"miDebuggerServerAddress": "100.1.1.150:10001"
}
]
</code></pre>
<p>I tried different versions of GDB, GDBSERVER, VSCode</p>
https://stackoverflow.com/q/725250443Hiteshhttps://stackoverflow.com/users/110700062022-06-07T01:37:53Z2025-10-01T22:07:55Z
<p>I am trying to run some solidity code but receiving this error on vs code. I am not sure what the issue is.</p>
<blockquote>
<p>node version
node:internal/modules/cjs/loader:942
throw err;
^</p>
</blockquote>
<p>Error: Cannot find module '/Users/h/U_Block Developer/star/version'
at Module._resolveFilename (node:internal/modules/cjs/loader:939:15)
at Module._load (node:internal/modules/cjs/loader:780:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}</p>
<p>I am on Mac Monterey OS.</p>
<p><a href="https://i.sstatic.net/PZMST.png" rel="nofollow noreferrer">Image here</a></p>