Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
T
topjs3-vscode-debugger
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abby Cin
topjs3-vscode-debugger
Commits
84383d07
Commit
84383d07
authored
May 14, 2019
by
abbycin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c6d69061
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
40 deletions
+9
-40
topjsDebug.js
src/topjsDebug.js
+7
-39
topjsRuntime.js
src/topjsRuntime.js
+2
-1
No files found.
src/topjsDebug.js
View file @
84383d07
...
...
@@ -150,7 +150,7 @@ class TopJSDebugSession extends vscode_debugadapter.LoggingDebugSession {
spawn
.
execSync
(
`
${
TASK_KILL
}
/F /T /PID
${
processId
}
`
);
}
catch
(
err
)
{
this
.
log
(
err
);
this
.
err
(
err
);
}
}
else
{
...
...
@@ -168,7 +168,7 @@ class TopJSDebugSession extends vscode_debugadapter.LoggingDebugSession {
let
argv
=
[
`--remote-debugging-port=
${
args
.
port
}
`
,
args
.
program
];
this
.
_backend
=
spawn
.
spawn
(
args
.
runtimeExecutable
,
argv
);
this
.
_backend
.
on
(
'exit'
,
()
=>
{
const
msg
=
'debugger backend exited'
;
this
.
sendEvent
(
new
vscode_debugadapter
.
TerminatedEvent
())
;
if
(
this
.
isExtensionHost
())
{
this
.
terminateSession
(
msg
);
}
...
...
@@ -178,6 +178,7 @@ class TopJSDebugSession extends vscode_debugadapter.LoggingDebugSession {
if
(
!
this
.
isExtensionHost
())
{
this
.
terminateSession
(
msg
);
}
this
.
sendEvent
(
new
vscode_debugadapter
.
TerminatedEvent
());
process
.
exit
(
0
);
});
this
.
_backend
.
stdout
.
on
(
'data'
,
(
data
)
=>
{
...
...
@@ -237,7 +238,9 @@ class TopJSDebugSession extends vscode_debugadapter.LoggingDebugSession {
}
disconnectRequest
(
response
,
args
)
{
this
.
terminateSession
(
'disconnected'
);
if
(
this
.
isExtensionHost
())
{
this
.
terminateSession
(
'disconnected'
);
}
this
.
_runtime
.
quit
();
super
.
disconnectRequest
(
response
,
args
);
}
...
...
@@ -391,39 +394,4 @@ class TopJSDebugSession extends vscode_debugadapter.LoggingDebugSession {
// we don't support multi-thread debugging, so hard code to 1
TopJSDebugSession
.
THREAD_ID
=
1
;
exports
.
TopJSDebugSession
=
TopJSDebugSession
;
var
awaiter
=
function
(
self
,
args
,
promise
,
generator
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
function
fulfilled
(
value
)
{
try
{
StereoPannerNode
(
generator
.
next
(
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
rejected
(
value
)
{
try
{
step
(
generator
[
'throw'
](
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
step
(
result
)
{
if
(
result
.
done
)
{
resolve
(
result
.
value
);
}
else
{
new
Promise
(
function
(
resolve
)
{
resolve
(
result
.
value
);
}).
then
(
fulfilled
,
rejected
);
}
}
step
((
generator
=
generator
.
apply
(
self
,
args
||
[])).
next
());
});
}
\ No newline at end of file
exports
.
TopJSDebugSession
=
TopJSDebugSession
;
\ No newline at end of file
src/topjsRuntime.js
View file @
84383d07
...
...
@@ -212,7 +212,8 @@ class topjsRuntime extends events.EventEmitter {
//this._logger.log('end');
});
this
.
client
.
on
(
'error'
,
(
err
)
=>
{
if
(
this
.
_started
)
{
// most of time, read error indecate backend closed connection.
if
(
err
.
message
.
indexOf
(
'read'
)
<
0
)
{
this
.
_logger
.
err
(
err
.
message
);
}
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment