Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"args": [ "--server=4712" ],
"stopOnEntry": false,
"sourceMaps": true,
"outDir": "${workspaceRoot}/out",
"cwd": "${workspaceRoot}"
"outFiles": [ "${workspaceFolder}/out/**/*.js" ],
"cwd": "${workspaceFolder}"
},
{
"name": "launch in extension host",
Expand All @@ -22,10 +22,9 @@
"args": [
"--extensionDevelopmentPath=${workspaceRoot}"
],
"stopOnEntry": true,
"sourceMaps": true,
"outDir": "${workspaceRoot}/out",
"cwd": "${workspaceRoot}"
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [ "${workspaceFolder}/out/**/*.js" ],
},
{
"name": "run tests on mac",
Expand Down Expand Up @@ -75,5 +74,11 @@
"outDir": "${workspaceRoot}/out",
"cwd": "${workspaceRoot}"
}
]
],
"compounds": [
{
"name": "Extension + Server",
"configurations": [ "launch in extension host", "launch as server" ]
}
]
}
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript",
"version": "0.7.3",
"version": "0.7.4",
"minNativescriptCliVersion": "2.5.0",
"icon": "images/icon.png",
"displayName": "NativeScript",
Expand All @@ -25,13 +25,14 @@
],
"license": "SEE LICENSE IN LICENSE.txt",
"dependencies": {
"vscode-chrome-debug-core": "~3.9.0",
"node-ipc": "8.10.3",
"source-map": "0.6.1",
"xmlhttprequest": "https://github.com/telerik/node-XMLHttpRequest/tarball/master",
"tree-kill": "^1.2.0",
"universal-analytics": "0.4.13",
"vscode-chrome-debug-core": "~3.9.0",
"vscode-debugadapter": "1.26.0",
"vscode-debugprotocol": "1.26.0"
"vscode-debugprotocol": "1.26.0",
"xmlhttprequest": "https://github.com/telerik/node-XMLHttpRequest/tarball/master"
},
"devDependencies": {
"@types/mocha": "2.2.41",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class SourceMapTransformer implements DebugProtocol.IDebugTransformer {
public setBreakpoints(args: DebugProtocol.ISetBreakpointsArgs, requestSeq: number): Promise<void> {
return new Promise<void>((resolve, reject) => {
if (this._sourceMaps && args.source.path && path.extname(args.source.path) !== ".js") {
const argsPath = args.source.path;
const argsPath = utils.fixDriveLetterAndSlashes(args.source.path);
const mappedPath = this._sourceMaps.MapPathFromSource(argsPath);
if (mappedPath) {
Services.logger().log(`SourceMaps.setBP: Mapped ${argsPath} to ${mappedPath}`);
Expand Down
3 changes: 2 additions & 1 deletion src/debug-adapter/webKitDebugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {formatConsoleMessage} from './consoleHelper';
import {Services} from '../services/debugAdapterServices';
import {LoggerHandler, Handlers, Tags} from '../common/logger';
import {DebugRequest} from './debugRequest';
import * as kill from 'tree-kill';

interface IScopeVarHandle {
objectId: string;
Expand Down Expand Up @@ -357,7 +358,7 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
public disconnect(): Promise<void> {
this.clearEverything();
if (this._tnsProcess) {
this._tnsProcess.kill('SIGQUIT');
kill(this._tnsProcess.pid, 'SIGQUIT')
this._tnsProcess = null;
}
if (this._webKitConnection) {
Expand Down
4 changes: 2 additions & 2 deletions src/project/androidProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ export class AndroidProject extends Project {
debugPort = parseInt((<string>match.matches[0]).match("(?:debug port: )([\\d]{5})")[1]);
if (attach) {
// wait a little before trying to connect, this gives a chance for adb to be able to connect to the debug socket
setTimeout(() => { eventEmitter.emit('readyForConnection', debugPort); }, 500);
setTimeout(() => { eventEmitter.emit('readyForConnection', debugPort); }, 1000);
}
});
if (!attach) {
new scanner.StringMatchingScanner(readableStream).onEveryMatch('# NativeScript Debugger started #', (match: scanner.MatchFound) => {
// wait a little before trying to connect, this gives a chance for adb to be able to connect to the debug socket
setTimeout(() => { eventEmitter.emit('readyForConnection', debugPort); }, 500);
setTimeout(() => { eventEmitter.emit('readyForConnection', debugPort); }, 1000);
});
}
}
Expand Down