vscode-tasks

vscode import error for python module

安稳与你 提交于 2019-12-03 05:38:32
I am trying to do an import in python from one directory level up. import sys sys.path.append('..') from cn_modules import exception I get an Error from VSCode when I try to do Run Build Task as: ImportError: No module named cn_modules The same code works without any error from terminal (python) . I face the problem when I try to run it from VSCode Run Build task . Any clue on what is wrong here? Have spent quiet some time but not able to resolve this, Any help is appreciated. NOTE: this works when i do debug using vscode too. Below are my config for launch.json and tasks.json launch.json {

How to make vscode not wait for finishing a preLaunchTask?

…衆ロ難τιáo~ 提交于 2019-12-03 05:07:13
I have a debug setup in Visual Studio code where I run an external binary which can execute my JS files (using duktape). The debug adapter currently only supports attach requests (not launch) so I have to run the binary before I can debug the JS scripts. In order to avoid having to start the application manually I created a task for it and set that in my launch.json file: { "version": "0.2.0", "configurations": [{ "name": "Attach MGA", "type": "duk", "preLaunchTask": "debug mga", "request": "attach", "address": "localhost", "port": 9091, "localRoot": "${workspaceRoot}", "stopOnEntry": false,

code . is not recognized as an internal or external command

那年仲夏 提交于 2019-12-03 03:12:58
I want to open directory using cmd in visual studio code but its give me error in cmd. So, What setting is require for that? I have performed below command D:\RND>code . d.moncada It needs to be setup so that Code is found in your PATH . If you're on a mac system, do the following (for windows systems, read below): Launch VS Code Open up command palette (press F1 ) and type shell command to find Shell Command: Install 'code' command in PATH command . Restart terminal If you're on Windows, you can also set the PATH manually by adding: C:\Program Files (x86)\Microsoft VS Code\bin to your PATH

How to chain tasks in Visual Studio Code using only tasks.json?

让人想犯罪 __ 提交于 2019-12-01 15:02:19
I have been ploughing through the documentation of Visual Studio Code to figure out how to add multiple consecutive tasks to the tasks.json file. The tasks array only allows for creating different arguments to the same command. In this example the command is echo . { "version": "0.1.0", "command": "echo", "isShellCommand": true, "args": [], "showOutput": "always", "echoCommand": true, "suppressTaskName": true, "tasks": [ { "taskName": "hello", "args": ["Hello World"] }, { "taskName": "bye", "args": ["Good Bye"] } ] } Does tasks.json allow several tasks to be executed consecutively? For example

How to chain tasks in Visual Studio Code using only tasks.json?

心已入冬 提交于 2019-12-01 14:38:39
问题 I have been ploughing through the documentation of Visual Studio Code to figure out how to add multiple consecutive tasks to the tasks.json file. The tasks array only allows for creating different arguments to the same command. In this example the command is echo . { "version": "0.1.0", "command": "echo", "isShellCommand": true, "args": [], "showOutput": "always", "echoCommand": true, "suppressTaskName": true, "tasks": [ { "taskName": "hello", "args": ["Hello World"] }, { "taskName": "bye",

Multiple commands/tasks with Visual Studio Code

偶尔善良 提交于 2019-11-27 19:45:48
I have a local folder that I use as a scratch pad for multiple little sample and toy pieces of code. I store a host of python, C++, shell scripts etc. in this directory. I'm using Visual Studio Code (on OS X) and am looking into its tasks to run/compile the code snippets without having to switch to a terminal. For example, I found this following task will run python on the currently open file. // A task runner that runs a python program { "version": "0.1.0", "command": "/usr/bin/python", "args": ["${file}"] } This task will use python as the task runner irrespective of the type of file I'm

Multiple commands/tasks with Visual Studio Code

…衆ロ難τιáo~ 提交于 2019-11-27 04:23:54
问题 I have a local folder that I use as a scratch pad for multiple little sample and toy pieces of code. I store a host of python, C++, shell scripts etc. in this directory. I'm using Visual Studio Code (on OS X) and am looking into its tasks to run/compile the code snippets without having to switch to a terminal. For example, I found this following task will run python on the currently open file. // A task runner that runs a python program { "version": "0.1.0", "command": "/usr/bin/python",

Define multiple tasks in VSCode

你。 提交于 2019-11-26 22:00:07
I have seen that it is possible to define a task in the VSCode. But I am not sure how to define multiple tasks in the tasks.json file. Dan Just in case it helps someone... . If you don't have/want gulp/grunt/etc... or an extra shell script to proxy out your task commands , "npm run" is there already . this is for webpack and mocha as in "Build and Test" , Shift + Ctrl + B , Shift + Ctrl + T .vscode/tasks.json: { "name": "npmTask", //... "suppressTaskName": true, "command": "npm", "isShellCommand": true, "args": [ "run" ], "tasks": [ { //Build Task "taskName": "webpack", //Run On Shift+Ctrl+B

Define multiple tasks in VSCode

非 Y 不嫁゛ 提交于 2019-11-26 08:07:37
问题 I have seen that it is possible to define a task in the VSCode. But I am not sure how to define multiple tasks in the tasks.json file. 回答1: Just in case it helps someone... . If you don't have/want gulp/grunt/etc... or an extra shell script to proxy out your task commands , "npm run" is there already . this is for webpack and mocha as in "Build and Test" , Shift + Ctrl + B , Shift + Ctrl + T .vscode/tasks.json: { "name": "npmTask", //... "suppressTaskName": true, "command": "npm",

How do I set up Visual Studio Code to compile C++ code?

我的梦境 提交于 2019-11-26 05:51:38
Microsoft's Visual Studio Code editor is quite nice, but it has no default support for building C++ projects. How do I configure it to do this? There is a much easier way to compile and run C++ code, no configuration needed: Install the Code Runner Extension Open your C++ code file in Text Editor, then use shortcut Ctrl+Alt+N , or press F1 and then select/type Run Code , or right click the Text Editor and then click Run Code in context menu, the code will be compiled and run, and the output will be shown in the Output Window. Moreover you could update the config in settings.json using