vscode-tasks

Terminate another task from within a postDebugTask - VS Code

佐手、 提交于 2019-12-13 03:56:55
问题 I have a debug launch configuration ( launch.json ) like below. { "version": "0.2.0", "configurations": [ { "name": "Current TS File", "type": "node", "request": "launch", "preLaunchTask": "Pre Debug Task", "postDebugTask": "Stop Watch Styles", "args": ["${relativeFile}"], "runtimeArgs": ["--nolazy", "-r", "ts-node/register"], "sourceMaps": true, "cwd": "${workspaceRoot}", "protocol": "inspector", } ] } My tasks configuration ( tasks.json ) is like { "version": "2.0.0", "tasks": [ { "type":

VS Code Multiple Language highlighters in one File

拥有回忆 提交于 2019-12-12 15:13:43
问题 First of all, I have just migrated to VS Code for Sublime Text couple of days back. what I want is to Multiple Language highlighters in one Language extension. eg: I want to highlight the proper ending tags of HTML , PHP and Javascript inside .php file. The only method I could find out was in the settings I added this following code: "files.associations": { "*.php":"html, php" } When I tried this the .php file only highlights the HTML syntax. So is there any extension or any other way of

VS Code setup for C++

末鹿安然 提交于 2019-12-12 05:29:49
问题 I have a problem with understanding how to setup VS Code to create C++ (11) programs. I had installed previously VS 2015 community, so I had everything necessary to create a program in one package. Now I want to learn how to do the same thing in text editor/not full IDE. I have installed c++ extension, created new folder and created simple main.cpp with hello world. I don't know how to tell VS Code to use Visual C++ Compiler and Debugger, or which other compiler to download an set up. I also

How to debug c++ code using Bazel on Windows 10 OS

余生颓废 提交于 2019-12-11 05:46:35
问题 Recently I start to play with the Bazel and I face a problem with debugging the app, I can debug with g++ but I can't debug the Bazel generated .exe file. Thank you for looking on this. Also, I build the source code with the Bazel and VsCode tasks. What .exe file should I target to debug my application? Is my setup Ok.? It is possible to debug a c++ source code using Bazel on Windows.? Should I use minGW for debugin a bazel generated executable or some othertools or debuggers.? Versions OS:

GNU G++ stops compiling after including D3D12 include paths (Using VSCode)

自闭症网瘾萝莉.ら 提交于 2019-12-11 05:24:44
问题 I am trying to get VSCode to compile DS3 Code, I have heard I needed these four include paths for D3D files to compile (to include d3d12.h): C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\shared C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\winrt C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\cppwinrt Source: I can't configure include paths in VSCode for D3D12 So I did include them but now a

Setting up VS Code for C using Cygwin64 Compiler and Debugger on Windows

六月ゝ 毕业季﹏ 提交于 2019-12-11 04:56:28
问题 Would like to set up VS Code to work with Cygwin/Cygwin64. Already have these set up: Installed Cygwin64 on windows Installed gcc (Compiler) and gdb (Debugger) packages from Cygwin installer GCC and GDB are NOT in windows path. Installed Visual Studio Code Posting this because it took me a couple of days from multiple different sources to set this up. This is specifically for Windows with Cygwin/Cygwin64 installed. DISCLAIMER: I've only tested this for building single files. 回答1: Instructions

Want ${workspaceFolder} to emit forward slashes on Windows?

被刻印的时光 ゝ 提交于 2019-12-10 17:16:57
问题 I'm configuring a VSCode task in tasks.json, and I need to pass the ${workspaceFolder} to a 'make' command, however it needs to be forward slashes, not back slashes. { "version": "2.0.0", "echoCommand": true, "tasks": [ { "label": "build", "type": "shell", "group": { "kind": "build", "isDefault": true }, "command": "make", "args": [ "APPDIR=\"${workspaceFolder}\"" ] . . . Is there any way to modify ${workspaceFolder} to emit forward slashes on Windows? Or, is there such a thing as a macro,

VSCode: Environment variable in task not found

最后都变了- 提交于 2019-12-10 10:58:01
问题 I am trying to define my own environment variables in the tasks.json in VSCode. Following every link I have found so far, I tried the following: { "version": "2.0.0", "type": "shell", "options": { "env": { "APP_NAME": "myApp" } }, "problemMatcher": { "owner": "cpp", "fileLocation": [ "relative", "${workspaceFolder}" ], "pattern": { "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "column": 3, "severity": 4, "message": 5 } }, "presentation": { "echo": true,

How to Set a Keyboard Shortcut to “Terminate Running Task” in VSCode?

强颜欢笑 提交于 2019-12-10 01:59:08
问题 I have my build run my application until I kill it. This works fine, but it would be nice to bind "Terminate Running Tasks" to a keyboard shortcut. Is this possible? 回答1: All the commands are listed when you go to change a key binding, so you can add something like this to the user settings: [ { "key": "shift+cmd+s", "command": "workbench.action.tasks.terminate" } ] 回答2: You could also just write exit in the terminal and that would kill it. Just keep in mind that this might not work on

Get relative path of the file for tasks in vscode

Deadly 提交于 2019-12-09 18:22:45
问题 I have a task defined in vscode's tasks.json file as following { "version": "0.1.0", "tasks": [ { "command": "gulp", "taskName": "eslint_task", "args": [ "eslint", "--file", "${file}" ], "echoCommand": true } ] } The ${file} is providing me the absolute path (starting from /Volumes in macOS) of the file on which I run this command. Is there any way I can get the relative path (Path starting from the workspace folder) of the same file instead? I already checked the official documentation for