How do I set outfiles in Visual Studio Code? I am told this is required to speed up the Chrome Debugger. At present it takes the debugger about 3-5 minutes of just hanging there to when VSCode actually stops on the breakpoint.
I have js files in several folders in my root directory where index.html resides. The folders in the root directory include: General, MyProject, ... etc
This is my launch.json
{
// 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": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://127.0.0.1:5500/index.html",
"webRoot": "${workspaceFolder}"
}
]
}
Related
I press F5 to debug a VSCode extension and VSCode will open a new window that will contain the extension. The extension will open a new VSCode window to open a specific project. But this new VSCode window didn't contain the extension and I can't debug it anymore. What can I do? 😩
Not sure if you are looking for a specific extension. If you have already installed the debugger extension, Try to uninstall/reinstall.
Your automatically generated extension launch configuration should look like this:
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceFolder}/../OneDrive/Test Bed", // add the path here
"--extensionDevelopmentPath=${workspaceFolder}"
]
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/test/suite/index"
]
}
]
}
You see in the Run Extension configuration that I added a path from the extension's ${workspaceFolder} up one level and then into my OneDrive folder to another folder named Test Bed. That Test Bed folder will be opened in the first ExtensionHost window that is opened when you F5 and you can debug the extension using that folder immediately.
I have tried EVERYTHING. I have no idea why I keep getting this error every time I try to run/debug a website on visual studio code. Please see attached image for the error.
Here is my launch.json:
{
// 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": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}
Error Image
Ok, so I was writing some simple python code and when I ran it, It always said attached to chrome.
So to fix this problem,I went into the launch.json and accidentally removed all the code.
Can you please give me the DEFAULT launch.json please?
Python:
{
// 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"
}
]
}
Is there a way to add a custom run configuration that would run a current file in the terminal?
Currently no extensions exist for debugging .d files on Visual Studio Code. I still can manually enter the compile and run command with dmd in the terminal, though this gets tedious and the commands can be forgettable. I saw that it might be possible to do this more efficiently using tasks but I haven't found any sufficient examples on how to achieve it.
I use
{
// 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": [
{
"type": "code-d",
"request": "launch",
"name": "Debug D project",
"cwd": "${workspaceFolder}",
"program": "./darc-test-library"
}
]
}
Together with CodeLLDB.
This URL refresh every time when run and debug
If you're referring to the port, you can set it using flutter run --web-port <your_port_number>
If you are using VSCode, you can create launch.json file in .vscode folder.
The contents of the launch.json can be like this:
{
// 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": "Run (Debug)",
"program": "lib/main.dart",
"request": "launch",
"type": "dart",
"args": [
"--web-port",
"8686",
]
},
]
}
In you Google Cloud Console, you can just pass the referrer as http://localhost:8686