2017-05-12 4 views
0

Ich kann ein neu erstelltes Express-Projekt mit vscode nicht ausführen. Es schlägt einfach mit einer Nachricht fehl, die besagt: "Kann das Programm 'xxxx' nicht starten; das 'outDir' Attribut könnte helfen."Kann Express-Anwendung mit Visual Studio-Code nicht ausführen

Meine Haupt ausführbare Datei ist in bin/www

├── app.js 
├── bin 
│   └── www 

vscode Version 1.12.1

Commit f6868fce3eeb16663840eb82123369dec6077a9b Mit

Datum 2017-05-04T21: 40: 39.245Z

Shell 1.6.6

Renderer 56.0.292 4,87

Knoten 7.4.0

auf Linux 4.8.0-51-generiC# 54-Ubuntu SMP Di 25. April 16.32.21 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Das ist mein launch.json Datei:

{ 
    "version": "0.2.0", 
    "configurations": [ 
     { 
      "type": "node", 
      "request": "launch", 
      "name": "Launch Program", 
      "program": "${workspaceRoot}/bin/www", 
      "protocol": "inspector" 
     }, 
     { 
      "type": "node", 
      "request": "attach", 
      "name": "Attach to Process", 
      "address": "localhost", 
      "port": 5858 
     } 
    ] 
} 

Was kann ich tun?

Antwort

1

Ihr program Wert sollte auf Ihr Express-Skript zeigen. So:

{ 
    "version": "0.2.0", 
    "configurations": [ 
     { 
      "type": "node", 
      "request": "launch", 
      "name": "Launch Program", 
      "program": "${workspaceRoot}/app.js", 
      "protocol": "inspector" 
     }, 
     { 
      "type": "node", 
      "request": "attach", 
      "name": "Attach to Process", 
      "address": "localhost", 
      "port": 5858 
     } 
    ] 
} 
+0

Nein, es funktioniert nicht. – Oscar

+0

Ich würde versuchen, "trace": "all" zur Launch-Konfiguration hinzuzufügen, um zu sehen, ob Sie hilfreiche Debug-Informationen von der Konsole erhalten können. Lesen Sie auch dies, um zu sehen, ob es hilft ... https://github.com/Microsoft/vscode/issues/7745 – TimHayes

+0

Ich habe versucht, Ihre Beratung, aber das Ergebnis der Ablaufverfolgung gibt keine Informationen. Machst du? https://pastebin.com/hVCrexeM – Oscar

Verwandte Themen