1 | import { promise as wdpromise } from 'selenium-webdriver';
|
2 | import { ProtractorBrowser } from './browser';
|
3 | export declare class DebugHelper {
|
4 | private browserUnderDebug_;
|
5 | |
6 |
|
7 |
|
8 |
|
9 |
|
10 | debuggerValidated_: boolean;
|
11 | dbgCodeExecutor: any;
|
12 | constructor(browserUnderDebug_: ProtractorBrowser);
|
13 | initBlocking(debuggerClientPath: string, onStartFn: Function, opt_debugPort?: number): void;
|
14 | init(debuggerClientPath: string, onStartFn: Function, opt_debugPort?: number): void;
|
15 | /**
|
16 | * 1) Set up helper functions for debugger clients to call on (e.g.
|
17 | * execute code, get autocompletion).
|
18 | * 2) Enter process into debugger mode. (i.e. process._debugProcess).
|
19 | * 3) Invoke the debugger client specified by debuggerClientPath.
|
20 | *
|
21 | * @param {string} debuggerClientPath Absolute path of debugger client to use.
|
22 | * @param {boolean} blockUntilExit Whether to block the flow until process exit or resume
|
23 | * immediately.
|
24 | * @param {Function} onStartFn Function to call when the debugger starts. The
|
25 | * function takes a single parameter, which represents whether this is the
|
26 | * first time that the debugger is called.
|
27 | * @param {number=} opt_debugPort Optional port to use for the debugging
|
28 | * process.
|
29 | *
|
30 | * @return {Promise} If blockUntilExit, a promise resolved when the debugger process
|
31 | * exits. Otherwise, resolved when the debugger process is ready to begin.
|
32 | */
|
33 | init_(debuggerClientPath: string, blockUntilExit: boolean, onStartFn: Function, opt_debugPort?: number): wdpromise.Promise<{}>;
|
34 | |
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | private validatePortAvailability_(port);
|
46 | isAttached(): boolean;
|
47 | }
|