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

Commit

Permalink
Increase setBp timeout to fix #39
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Sep 28, 2016
1 parent 702ba2a commit 58ac42a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/chrome/chromeDebugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export abstract class ChromeDebugAdapter extends BaseDebugAdapter {
private static PAGE_PAUSE_MESSAGE = 'Paused in Visual Studio Code';
private static EXCEPTION_VALUE_ID = 'EXCEPTION_VALUE_ID';
private static PLACEHOLDER_URL_PROTOCOL = 'debugadapter://';
private static SET_BREAKPOINTS_TIMEOUT = 3000;

private _clientAttached: boolean;
private _currentStack: Chrome.Debugger.CallFrame[];
Expand Down Expand Up @@ -419,7 +420,7 @@ export abstract class ChromeDebugAdapter extends BaseDebugAdapter {
.then(() => this.addBreakpoints(targetScriptUrl, args.breakpoints))
.then(responses => ({ breakpoints: this.chromeBreakpointResponsesToODPBreakpoints(targetScriptUrl, responses, args.breakpoints) }));

const setBreakpointsPTimeout = utils.promiseTimeout(setBreakpointsPFailOnError, /*timeoutMs*/2000, 'Set breakpoints request timed out');
const setBreakpointsPTimeout = utils.promiseTimeout(setBreakpointsPFailOnError, ChromeDebugAdapter.SET_BREAKPOINTS_TIMEOUT, 'Set breakpoints request timed out');

// Do just one setBreakpointsRequest at a time to avoid interleaving breakpoint removed/breakpoint added requests to Chrome.
// Swallow errors in the promise queue chain so it doesn't get blocked, but return the failing promise for error handling.
Expand Down

0 comments on commit 58ac42a

Please sign in to comment.