forked from flyboy9/ProjectSpartanDbg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EdgeBugId.cmd
68 lines (61 loc) · 2 KB
/
EdgeBugId.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
@ECHO OFF
SETLOCAL
IF NOT "%cdb:~0,0%" == "" (
IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
SET cdb=C:\Program Files\Windows Kits\8.1\Debuggers\x64\cdb.exe
) ELSE (
SET cdb=C:\Program Files\Windows Kits\8.1\Debuggers\x86\cdb.exe
)
)
SET cdb=%cdb:"=%
IF NOT EXIST "%cdb%" (
ECHO - Cannot find cdb at "%cdb%", please set the "cdb" environment variable to the correct path.
EXIT /B 1
)
IF NOT "%EdgeDbg:~0,0%" == "" (
IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
SET EdgeDbg=%~dp0EdgeDbg_x64.exe
) ELSE (
SET EdgeDbg=%~dp0EdgeDbg_x86.exe
)
)
SET EdgeDbg=%EdgeDbg:"=%
IF NOT EXIST "%EdgeDbg%" (
ECHO - Cannot find EdgeDbg at "%EdgeDbg%", please set the "EdgeDbg" environment variable to the correct path.
EXIT /B 1
)
IF NOT "%BugId:~0,0%" == "" (
SET BugId=%~dp0..\BugId\BugId.py
)
SET BugId=%BugId:"=%
IF NOT EXIST "%BugId%" (
ECHO - Cannot find BugId at "%BugId%", please set the "BugId" environment variable to the correct path.
EXIT /B 1
)
IF NOT "%PYTHON:~0,0%" == "" (
SET PYTHON=C:\Python27\python.exe
)
SET PYTHON=%PYTHON:"=%
IF NOT EXIST "%PYTHON%" (
ECHO - Cannot find Python at "%PYTHON%", please set the "PYTHON" environment variable to the correct path.
EXIT /B 1
)
If "%~1" == "" (
SET URL=http://%COMPUTERNAME%:28876/
SET BugIdArguments=
) ELSE (
SET URL=%1
SET BugIdArguments=%2 %3 %4 %5 %6 %7 %8 %9
)
ECHO * Terminating any running instances of Microsoft Edge...
TASKKILL /F /IM MicrosoftEdge.exe 2>nul >nul
TASKKILL /F /IM browser_broker.exe 2>nul >nul
TASKKILL /F /IM RuntimeBroker.exe 2>nul >nul
TASKKILL /F /IM MicrosoftEdgeCP.exe 2>nul >nul
IF EXIST "%LOCALAPPDATA%\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\User\Default\Recovery\Active\*.*" (
ECHO * Deleting crash recovery data...
DEL "%LOCALAPPDATA%\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\User\Default\Recovery\Active\*.*" /Q >nul
)
ECHO * Starting Edge in BugId...
ECHO + URL: %URL%
"%EdgeDbg%" "%URL%" "%PYTHON%" "%BugId%" --pids=@ProcessIds@ %BugIdArguments%