Freizon Calderon
Freizon Calderon

Reputation: 31

Visual Studio Code - Debugging

I downloaded the Visual Studio Code, but I don't know how to configure the debugger.

I am learning programming and i don't know how to configure it?

someone help me with this problem?

This is what you need to configure.


{
"version": "0.1.0",
// List of configurations. Add new configurations or edit existing ones.  
// ONLY "node" and "mono" are supported, change "type" to switch.
"configurations": [
    {
        // Name of configuration; appears in the launch configuration drop down menu.
        "name": "Launch app.js",
        // Type of configuration. Possible values: "node", "mono".
        "type": "node",
        // Workspace relative or absolute path to the program.
        "program": "app.js",
        // Automatically stop program after launch.
        "stopOnEntry": true,
        // Command line arguments passed to the program.
        "args": [],
        // Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
        "cwd": ".",
        // Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
        "runtimeExecutable": null,
        // Environment variables passed to the program.
        "env": { }
    }, 
    {
        "name": "Attach",
        "type": "node",
        // TCP/IP address. Default is "localhost".
        "address": "localhost",
        // Port to attach to.
        "port": 5858
    }
]
}

Upvotes: 1

Views: 2994

Answers (2)

Uri Goo
Uri Goo

Reputation: 101

If you are coding with php you can follow these step

enter image description here

enter image description here

You can copy and paste code:

"version": "0.2.0",
"configurations": [
    {
        "name": "Listen for XDebug",
        "type": "php",
        "request": "launch",
        "port": 9000
    },
    {
        "name": "Launch currently open script",
        "type": "php",
        "request": "launch",
        "program": "${file}",
        "cwd": "${fileDirname}",
        "port": 9000
    }
]

Upvotes: 0

Avin Zarlez
Avin Zarlez

Reputation: 1682

You need to be more specific with your question.

What kind of code are you debugging?

Right now Visual Studio Code has debugging support for Node.js (JavaScript and TypeScript) on all platforms, experimental support for mono (C# and F#) on OS X and Linux, and soon ASP.NET 5.

If you are using one of those, you should be able to start using debugging features.

For more information, here is a direct link to the official debugging documentation: https://code.visualstudio.com/Docs/debugging

Upvotes: 1

Related Questions