Skip to content

Commit

Permalink
Fix #4056, Debugger statements in production code (#4082)
Browse files Browse the repository at this point in the history
Signed-off-by: paulober <[email protected]>
  • Loading branch information
paulober authored Sep 30, 2024
1 parent 3305ff2 commit 9b6e016
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 9 additions & 3 deletions src/drivers/cmakeServerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ export class CMakeServerClient {
break;
}
if (mat.length !== 3) {
debugger;
if (process.env.NODE_ENV === 'development') {
debugger;
}
throw new global.Error(localize('protocol.error.cmake', 'Protocol error talking to CMake! Got this input: {0}', input));
}
this.accInput = mat[2];
Expand Down Expand Up @@ -474,7 +476,9 @@ export class CMakeServerClient {
}
}
}
debugger;
if (process.env.NODE_ENV === 'development') {
debugger;
}
log.warning(localize('cant.yet.handle.message', 'Can\'t yet handle the {0} messages', some.type));
}

Expand Down Expand Up @@ -587,7 +591,9 @@ export class CMakeServerClient {
pipe.on('error', e => {
pipe.end();
if (!this.shutDownFlag) {
debugger;
if (process.env.NODE_ENV === 'development') {
debugger;
}
rollbar.takePromise(localize('pipe.error.from.cmake-server', 'Pipe error from cmake-server'),
{ pipe: pipeFile },
params.onPipeError(e));
Expand Down
4 changes: 3 additions & 1 deletion src/projectOutline/projectOutline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,9 @@ export class TargetNode extends BaseNode {
].join(',');
return item;
} catch (e) {
debugger;
if (process.env.NODE_ENV === 'development') {
debugger;
}
return new vscode.TreeItem(`${this.name} (${localize('item.render.issue', 'There was an issue rendering this item. This is a bug')})`);
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/rollbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ class RollbarController {
*/
error(what: string, additional: object = {}): void {
log.error(what, JSON.stringify(additional, (key, value) => stringifyReplacer(key, value)));
debugger;
if (process.env.NODE_ENV === 'development') {
debugger;
}
}

info(what: string, additional: object = {}): void {
Expand Down

0 comments on commit 9b6e016

Please sign in to comment.