vscode launch webserver before start debugging

Multi tool use
Multi tool use












0















My intention is to start automatically an internal webserver (using express extension https://marketplace.visualstudio.com/items?itemName=Compulim.vscode-express) with a launch configuration in the preLaunchTask property. For debugging I'm using Debugger for Chrome in vscode.



Express offers vscode commands like 'express.hostWorkspace' or 'express.hostWorkspaceWithRandomPort'.
I tried to config this vscode commands in a task and use this task in the preLaunchTask property, but it doesn't worked.



Is it possibile to run vscode commands as a task and use it in preLaunchTask or is there an other possibility?










share|improve this question

























  • Have you seen this: stackoverflow.com/questions/40045078/… You could run a gulp/grunt task to start your server as part of your launch configuration.

    – Mark
    Jul 18 '17 at 18:09











  • Thanks Mark. I didn't find this question when I searched for my problem. Moreover I don't know if it is possible to run a vscode command in a gulp task. Nevertheless it is an oppertunity also to run express via own code. I will try it

    – Lukas
    Jul 18 '17 at 19:04













  • It seems to be that it is problematic, because the job never terminates. So if you run it as preLaunchTask the follow-up action (loading the debug browser) is not done.

    – Lukas
    Jul 27 '17 at 7:11
















0















My intention is to start automatically an internal webserver (using express extension https://marketplace.visualstudio.com/items?itemName=Compulim.vscode-express) with a launch configuration in the preLaunchTask property. For debugging I'm using Debugger for Chrome in vscode.



Express offers vscode commands like 'express.hostWorkspace' or 'express.hostWorkspaceWithRandomPort'.
I tried to config this vscode commands in a task and use this task in the preLaunchTask property, but it doesn't worked.



Is it possibile to run vscode commands as a task and use it in preLaunchTask or is there an other possibility?










share|improve this question

























  • Have you seen this: stackoverflow.com/questions/40045078/… You could run a gulp/grunt task to start your server as part of your launch configuration.

    – Mark
    Jul 18 '17 at 18:09











  • Thanks Mark. I didn't find this question when I searched for my problem. Moreover I don't know if it is possible to run a vscode command in a gulp task. Nevertheless it is an oppertunity also to run express via own code. I will try it

    – Lukas
    Jul 18 '17 at 19:04













  • It seems to be that it is problematic, because the job never terminates. So if you run it as preLaunchTask the follow-up action (loading the debug browser) is not done.

    – Lukas
    Jul 27 '17 at 7:11














0












0








0








My intention is to start automatically an internal webserver (using express extension https://marketplace.visualstudio.com/items?itemName=Compulim.vscode-express) with a launch configuration in the preLaunchTask property. For debugging I'm using Debugger for Chrome in vscode.



Express offers vscode commands like 'express.hostWorkspace' or 'express.hostWorkspaceWithRandomPort'.
I tried to config this vscode commands in a task and use this task in the preLaunchTask property, but it doesn't worked.



Is it possibile to run vscode commands as a task and use it in preLaunchTask or is there an other possibility?










share|improve this question
















My intention is to start automatically an internal webserver (using express extension https://marketplace.visualstudio.com/items?itemName=Compulim.vscode-express) with a launch configuration in the preLaunchTask property. For debugging I'm using Debugger for Chrome in vscode.



Express offers vscode commands like 'express.hostWorkspace' or 'express.hostWorkspaceWithRandomPort'.
I tried to config this vscode commands in a task and use this task in the preLaunchTask property, but it doesn't worked.



Is it possibile to run vscode commands as a task and use it in preLaunchTask or is there an other possibility?







debugging visual-studio-code vscode-tasks






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 30 '18 at 23:26









Gama11

11.4k32247




11.4k32247










asked Jul 18 '17 at 8:30









LukasLukas

113




113













  • Have you seen this: stackoverflow.com/questions/40045078/… You could run a gulp/grunt task to start your server as part of your launch configuration.

    – Mark
    Jul 18 '17 at 18:09











  • Thanks Mark. I didn't find this question when I searched for my problem. Moreover I don't know if it is possible to run a vscode command in a gulp task. Nevertheless it is an oppertunity also to run express via own code. I will try it

    – Lukas
    Jul 18 '17 at 19:04













  • It seems to be that it is problematic, because the job never terminates. So if you run it as preLaunchTask the follow-up action (loading the debug browser) is not done.

    – Lukas
    Jul 27 '17 at 7:11



















  • Have you seen this: stackoverflow.com/questions/40045078/… You could run a gulp/grunt task to start your server as part of your launch configuration.

    – Mark
    Jul 18 '17 at 18:09











  • Thanks Mark. I didn't find this question when I searched for my problem. Moreover I don't know if it is possible to run a vscode command in a gulp task. Nevertheless it is an oppertunity also to run express via own code. I will try it

    – Lukas
    Jul 18 '17 at 19:04













  • It seems to be that it is problematic, because the job never terminates. So if you run it as preLaunchTask the follow-up action (loading the debug browser) is not done.

    – Lukas
    Jul 27 '17 at 7:11

















Have you seen this: stackoverflow.com/questions/40045078/… You could run a gulp/grunt task to start your server as part of your launch configuration.

– Mark
Jul 18 '17 at 18:09





Have you seen this: stackoverflow.com/questions/40045078/… You could run a gulp/grunt task to start your server as part of your launch configuration.

– Mark
Jul 18 '17 at 18:09













Thanks Mark. I didn't find this question when I searched for my problem. Moreover I don't know if it is possible to run a vscode command in a gulp task. Nevertheless it is an oppertunity also to run express via own code. I will try it

– Lukas
Jul 18 '17 at 19:04







Thanks Mark. I didn't find this question when I searched for my problem. Moreover I don't know if it is possible to run a vscode command in a gulp task. Nevertheless it is an oppertunity also to run express via own code. I will try it

– Lukas
Jul 18 '17 at 19:04















It seems to be that it is problematic, because the job never terminates. So if you run it as preLaunchTask the follow-up action (loading the debug browser) is not done.

– Lukas
Jul 27 '17 at 7:11





It seems to be that it is problematic, because the job never terminates. So if you run it as preLaunchTask the follow-up action (loading the debug browser) is not done.

– Lukas
Jul 27 '17 at 7:11












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45161409%2fvscode-launch-webserver-before-start-debugging%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45161409%2fvscode-launch-webserver-before-start-debugging%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







SAm,Of9,WiXvKV2IwTCyvEE
X,RJtn,g4oq,ZmgfKuT9fuVBH,zbQFKbalGdnNw1jutSKWNRt6VEuqaTYpZEhE,upOhdR2UpadLo

Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas