File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,10 @@ export class AttachDebugSession extends EmmyDebugSession implements ExprEvaluato
106106 const ls = cp . exec ( cmd ) . on ( "error" , e => {
107107 this . sendEvent ( new OutputEvent ( e . message ) ) ;
108108 this . sendEvent ( new TerminatedEvent ( ) ) ;
109+ } ) . on ( "exit" , code => {
110+ if ( code !== 0 ) {
111+ this . sendEvent ( new TerminatedEvent ( ) ) ;
112+ }
109113 } ) ;
110114 ls . stdout . on ( "data" , ( stdout :string ) => {
111115 this . sendEvent ( new OutputEvent ( stdout ) ) ;
Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ export class AttachDebuggerProvider implements vscode.DebugConfigurationProvider
3939 debugConfiguration . sourcePaths = this . getSourceRoots ( ) ;
4040 if ( debugConfiguration . type === "emmylua_launch" ) {
4141 if ( this . isNullOrEmpty ( debugConfiguration . workingDir ) ) {
42- debugConfiguration . workingDir = "%workspaceRoot%" ;
42+ var list = vscode . workspace . workspaceFolders ! . map ( f => { return f . uri . fsPath ; } ) ;
43+ if ( list . length > 0 ) {
44+ debugConfiguration . workingDir = list [ 0 ] ;
45+ }
4346 }
4447 if ( ! debugConfiguration . arguments ) {
4548 debugConfiguration . arguments = [ ] ;
You can’t perform that action at this time.
0 commit comments