Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
set sourceMaps to true by default; fixes #121
Browse files Browse the repository at this point in the history
  • Loading branch information
weinand committed Jan 23, 2017
1 parent 78d2077 commit 9693e24
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
4 changes: 0 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"args": [
"--extensionDevelopmentPath=${workspaceRoot}"
],
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/**/*.js" ]
},
{
Expand All @@ -19,7 +18,6 @@
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/src/node/nodeDebug.ts",
"args": [ "--server=4711" ],
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/**/*.js" ],
"internalConsoleOptions": "openOnSessionStart"
},
Expand All @@ -34,7 +32,6 @@
],
"restart": true,
"port": 5858,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/**/*.js" ],
"console": "integratedTerminal"
},
Expand All @@ -50,7 +47,6 @@
"--colors",
"./out/tests"
],
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/**/*.js" ],
"internalConsoleOptions": "openOnSessionStart"
}
Expand Down
1 change: 0 additions & 1 deletion src/node/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ export function activate(context: vscode.ExtensionContext) {
if (vscode.workspace.textDocuments.some(document => document.languageId === 'typescript' || document.languageId === 'coffeescript')) {
initialConfigurations.forEach(config => {
config['outFiles'] = [];
config['sourceMaps'] = true;
});
}
// Massage the configuration string, add an aditional tab and comment out processId.
Expand Down
7 changes: 5 additions & 2 deletions src/node/nodeDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ interface CommonArguments {
timeout?: number;
/** Automatically stop target after launch. If not specified, target does not stop. */
stopOnEntry?: boolean;
/** Configure source maps. By default source maps are disabled. */
/** Configure source maps. By default source maps are enabled (since v1.9.11). */
sourceMaps?: boolean;
/** Where to look for the generated code. Only used if sourceMaps is true. */
/** obsolete: Where to look for the generated code. Only used if sourceMaps is true. */
outDir?: string;
/** output files glob patterns */
outFiles?: string[];
Expand Down Expand Up @@ -1038,6 +1038,9 @@ export class NodeDebugSession extends DebugSession {
}

if (!this._sourceMaps) {
if (args.sourceMaps === undefined) {
args.sourceMaps = true;
}
if (typeof args.sourceMaps === 'boolean' && args.sourceMaps) {
const generatedCodeDirectory = args.outDir;
if (generatedCodeDirectory) {
Expand Down
9 changes: 0 additions & 9 deletions src/tests/adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ suite('Node Debug Adapter', () => {

return dc.hitBreakpoint({
program: PROGRAM,
sourceMaps: true,
runtimeArgs: [ '--nolazy' ]
}, {
path: TS_SOURCE,
Expand All @@ -194,7 +193,6 @@ suite('Node Debug Adapter', () => {

return dc.hitBreakpoint({
program: PROGRAM,
sourceMaps: true,
runtimeArgs: [ '--nolazy' ]
}, {
path: TS_SOURCE,
Expand All @@ -210,7 +208,6 @@ suite('Node Debug Adapter', () => {

return dc.hitBreakpoint({
program: PROGRAM,
sourceMaps: true,
outDir: OUT_DIR,
runtimeArgs: [ '--nolazy' ]
}, {
Expand All @@ -227,7 +224,6 @@ suite('Node Debug Adapter', () => {

return dc.hitBreakpoint({
program: PROGRAM,
sourceMaps: true,
outFiles: [ OUT_FILES ],
runtimeArgs: [ '--nolazy' ]
}, {
Expand All @@ -244,7 +240,6 @@ suite('Node Debug Adapter', () => {

return dc.hitBreakpoint({
program: PROGRAM,
sourceMaps: true,
outDir: OUT_DIR,
runtimeArgs: [ '--nolazy' ]
}, {
Expand All @@ -261,7 +256,6 @@ suite('Node Debug Adapter', () => {

return dc.hitBreakpoint({
program: PROGRAM,
sourceMaps: true,
outFiles: [ OUT_FILES ],
runtimeArgs: [ '--nolazy' ]
}, {
Expand All @@ -280,7 +274,6 @@ suite('Node Debug Adapter', () => {

return dc.hitBreakpoint({
program: PROGRAM,
sourceMaps: true,
outDir: OUT_DIR,
runtimeArgs: [ '--nolazy' ]
}, {
Expand All @@ -298,7 +291,6 @@ suite('Node Debug Adapter', () => {

return dc.hitBreakpoint({
program: PROGRAM,
sourceMaps: true,
outDir: OUT_DIR,
runtimeArgs: [ '--nolazy' ]
}, {
Expand All @@ -318,7 +310,6 @@ suite('Node Debug Adapter', () => {

return dc.hitBreakpoint({
program: PROGRAM,
sourceMaps: true,
outDir: OUT_DIR,
runtimeArgs: [ '--nolazy' ]
}, {
Expand Down

0 comments on commit 9693e24

Please sign in to comment.