Code Monkey home page Code Monkey logo

vscode-edge-debug's Introduction

vscode-edge-debug's People

Contributors

andysterland avatar auchenberg avatar dhanvikapila avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-edge-debug's Issues

Breakpoint added to ts file not working

When I add breakpoints to ts files in my application the breakpoint will be always unverified. The debug console contains "Not implemented" error messages.
Launch.json content:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch localhost with sourcemaps",
"type": "edge",
"request": "launch",
"url": "http://localhost:8000/",
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
"diagnosticLogging": true
}
]
}

Debug console content when adding BP in code:
›SourceMaps.setBP: Mapped c:\HPSRC\Git\Handy\Handy.Client\app\modules\search\customer-search.component.ts to c:\HPSRC\Git\Handy\Handy.Client\app\modules\search\customer-search.component.js
›SourceMaps.setBP: Mapped c:\HPSRC\Git\Handy\Handy.Client\app\modules\search\customer-search.component.ts:32:0 to c:\HPSRC\Git\Handy\Handy.Client\app\modules\search\customer-search.component.js:54:20
›SourceMaps.setBP: Mapped c:\HPSRC\Git\Handy\Handy.Client\app\modules\search\customer-search.component.ts:71:0 to c:\HPSRC\Git\Handy\Handy.Client\app\modules\search\customer-search.component.js:91:20
›Paths.setBP: Resolved c:\HPSRC\Git\Handy\Handy.Client\app\modules\search\customer-search.component.js to http://localhost:8000/app/modules/search/customer-search.component.js
›To target: {"id":5,"method":"Debugger.setBreakpointByUrl","params":{"url":"http://localhost:8000/app/modules/search/customer-search.component.js","lineNumber":54,"columnNumber":20}}
›To target: {"id":6,"method":"Debugger.setBreakpointByUrl","params":{"url":"http://localhost:8000/app/modules/search/customer-search.component.js","lineNumber":91,"columnNumber":20}}
›From target: {"id":5,"error":{"description":"Not implemented"}}
›From target: {"id":6,"error":{"description":"Not implemented"}}

›SourceMaps.setBP: Mapped c:\HPSRC\Git\Handy\Handy.Client\app\modules\search\customer-search.component.js:54:0 to c:/HPSRC/Git/Handy/Handy.Client/app/modules/search/customer-search.component.ts:32
›SourceMaps.setBP: Mapped c:\HPSRC\Git\Handy\Handy.Client\app\modules\search\customer-search.component.js:91:0 to c:/HPSRC/Git/Handy/Handy.Client/app/modules/search/customer-search.component.ts:71
›To client: {"seq":0,"type":"response","request_seq":5,"command":"setBreakpoints","success":true,"body":{"breakpoints":[{"verified":false,"line":33},{"verified":false,"line":72}]}}

Breakpoint in .ts file (Angular 2) not working

Hi,
i followed the Angular 2 Quickstart instructions to make a sample application in TypeScript. The application can be started with "npm start" command.
But if I want to set a breaktpoint, from example in file "hero.service.ts" --> getHeroes() function. The breakpoint is always unverified.

The debug console shows me the following

›From client: setBreakpoints({"source":{"path":"c:\\Projects\\Deleteme\\electron-angular-2\\app\\hero.service.ts","name":"hero.service.ts"},"lines":[38],"breakpoints":[{"line":38}],"sourceModified":false}) ›SourceMaps.setBP: Mapped c:\Projects\Deleteme\electron-angular-2\app\hero.service.ts to c:\Projects\Deleteme\electron-angular-2\app\hero.service.js ›SourceMaps.setBP: Mapped c:\Projects\Deleteme\electron-angular-2\app\hero.service.ts:37:0 to c:\Projects\Deleteme\electron-angular-2\app\hero.service.js:37:8 ›Paths.setBP: Resolved c:\Projects\Deleteme\electron-angular-2\app\hero.service.js to http://localhost:3000/app/hero.service.js ›To target: {"id":5,"method":"Debugger.setBreakpointByUrl","params":{"url":"http://localhost:3000/app/hero.service.js","lineNumber":37,"columnNumber":8}} ›undefined ›To client: {"seq":0,"type":"response","request_seq":6,"command":"setBreakpoints","success":false,"message":"[debugger-for-chrome] undefined"}

Steps to reproduce:

  1. Checkout source code.
  2. npm install
  3. npm start
  4. Press F5 or "Launch localhost with sourcemaps"
  5. Set breakpoint at function getHeroes() in "hero.service.ts".
  6. In application, click on menu "Heroes". Breakpoint can't be hold.

My launch.json

"name": "Launch localhost with sourcemaps", "type": "edge", "request": "launch", "url": "http://localhost:3000/dashboard", "sourceMaps": true, "webRoot": "${workspaceRoot}", "diagnosticLogging": true

Debugger doesn't stop at a breakpoint in AngularJs 1.6 SPA

Edge debugger doesn't appear to work right now. Maybe I'm configuring something incorrectly.

Windows 10 Ent: 15063.0 (1703)
Edge: 40.15063.0.0 (Disabled all extensions)
EdgeHtml: 15.15063
Debugger for Edge: 0.4.1
VSCode: 1.12.1
Node: 7.4.0

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Edge",
            "type": "edge",
            "request": "attach",
            "url": "http://localhost/app1/Staging/",
            "webRoot": "${workspaceRoot}/Web",
            "sourceMaps": true
        },
        {
            "name": "Launch Chrome",
            "type": "chrome",
            "request": "attach",
            "url": "http://localhost/app1/Staging/",
            "sourceMaps": true,
            "webRoot": "${workspaceRoot}/Web"
        },
        {
            "name": "Launch FireFox",
            "type": "firefox",
            "request": "launch",
            "reAttach": true,
            "url": "http://localhost/app1/Staging/",
            "webRoot": "${workspaceRoot}/Web"
        }
    ]
}

Our application is an Angular 1.6 SPA. I've set a debugger in our code, but it's not being hit. The Chrome and FireFox debuggers both work through.

The debug console output shows two warnings.

Warning: Can't find a page with url: http://localhost/app1/staging. Available pages: [...]
Warning: Found more than one valid target page. Attaching to the first one. Available pages: [...]

Cannot launch Edge with local web page

This is the launch.json I used in my VSCode
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch edge",
"type": "edge",
"request": "launch",
"file": "${workspaceRoot}/ta.html"
}
,
{
"name": "Launch localhost with sourcemaps",
"type": "edge",
"request": "launch",
"url": "file://C:/Users/Buddhi/Desktop/WebInterface/ta.html",
"webRoot": "${workspaceRoot}",
"sourceMaps":true
},
{
"name": "Attach edge",
"type": "edge",
"request": "attach",
"webRoot": "${workspaceRoot}", // optional: used to find the right tab running in Edge
"port": 9222
}
]
}

When I try to launch ta.html through VSCode with Launch edge name mode VSCode giving an error .
Please refer this image link: VSCode error
I refer the original documentation but I cannot launch a local file from edge please help.
Info
Link to the launch.json
Please note that I have a launch and debug configuration for the chrome too.It's working

Can you debug Edge extensions?

I'm just curious, using the Debugger for Edge in VS Code, can you debug Edge browser extensions or is the debugger only available to pages?

unexpected server response (400)

Hello,

i have an issue
When i config the launch.json with the attach script and i want to attach the file i got an error:

›Warning: Found more than one valid target page. Attaching to the first one. Available pages: ["about:start","https://www.msn.com/spartan/dhp?locale=de-DE&market=DE"]` and `[debugger-for-chrome] unexpected server response (400)

The Config:

{
    "version": "0.1.0",
    "configurations": [
        {
            "name": "Attach with sourcemaps",
            "type": "edge",
            "request": "attach",
            "port": 9222,
            "sourceMaps": true
        },
        {
            "name": "Attach to url with files served from ./out",
            "type": "edge",
            "request": "attach",
            "port": 9222,
            "webRoot": "${workspaceRoot}/out"
        }
    ]
}

Can't debug JS code in Edge from VS Code

I am using Windows 10 preview build (Build 16299.15) with EdgeHTML 16.16299.
Visual Studio Code 1.17.0.

Here is debug config on the launch.json.
Basically I created 2 entries: each for Chrome and Edge.

{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"diagnosticLogging": true,
"sourceMaps": true,
"file": "${workspaceRoot}/Chapter1-hello-world/hello.html"
},
{
"type": "edge",
"request": "launch",
"name": "Launch Edge",
"diagnosticLogging": true,
"sourceMaps": true,
"file": "${workspaceRoot}/Chapter1-hello-world/hello.html"
},

When debugging using Chrome, the breakpoint in the js file works just expected.
Switching to Edge, I am getting errors.

›Error: unexpected server response (400)
at ClientRequest.response (C:\Users\glay1.vscode\extensions\msjsdiag.debugger-for-edge-0.4.1\node_modules\ws\lib\WebSocket.js:694:15)
at Object.onceWrapper (events.js:293:19)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:191:7)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:522:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
at Socket.socketOnData (_http_client.js:411:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
›To client: {"seq":0,"type":"response","request_seq":2,"command":"launch","success":false,"message":"[debugger-for-chrome] unexpected server response (400)"}
›******** ERROR! Unhandled promise rejection: Error: unexpected server response (400)
›Adapter error: Error: Command failed: C:\Users\glay1.vscode\extensions\msjsdiag.debugger-for-edge-0.4.1\node_modules\edge-diagnostics-adapter\dist\x64\EdgeDiagnosticsAdapter.exe --port=9222
[2017-10-12 10:56:23] [error] Handshake ended with HTTP error: 400
[2017-10-12 10:56:23] [error] Handshake ended with HTTP error: 400
[2017-10-12 10:56:23] [error] Handshake ended with HTTP error: 400
[2017-10-12 10:56:23] [error] Handshake ended with HTTP error: 400
[2017-10-12 10:56:24] [error] Handshake ended with HTTP error: 400
[2017-10-12 10:56:24] [error] Handshake ended with HTTP error: 400
[2017-10-12 10:56:24] [error] Handshake ended with HTTP error: 400

›From client: disconnect({"restart":false})
›To client: {"seq":0,"type":"response","request_seq":3,"command":"disconnect","success":true}

Debugger breaks while trying to attach to Edge

I'm unable to connect the debugger to an open Edge window.
Also opening an Edge window via URL breaks the debugger, the Edge window opens with the correct url but the debugger fails.

2048 is a clone of Threes

Great work on the plugin! I have a fairly odd request.
In your readme there is a gif of debugging a game called 2048.

I'm not sure if you are aware, but 2048 was a clone of the game Threes. Threes design was agonized over for a long time, endlessly refined, it is a masterpiece of game design. At the last minute it was copied, and the copy received the mindshare.

It'd be great if the publicity went to the original creators. I'm hoping in your demo you could change the heading to Three's.

Thank you

Edge debugger getting HTTP error 400

I can't seem to make the edge debugging from vs code working.
I tried both the attach and launch debug, nothing worked.
(Fyi, the chrome debugging worked just fine)

I am using the windows 10 preview build - fast ring.
Microsoft Edge 41.16299.15.0
Microsoft EdgeHTML 16.16299

Here is the error log:

at ClientRequest.response (C:\Users\ahalim\.vscode\extensions\msjsdiag.debugger-for-edge-0.4.1\node_modules\ws\lib\WebSocket.js:694:15)
at Object.onceWrapper (events.js:293:19)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:191:7)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:522:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
at Socket.socketOnData (_http_client.js:411:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)

[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:34] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:35] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:35] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:35] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:35] [error] Handshake ended with HTTP error: 400
[2017-10-10 16:43:35] [error] Handshake ended with HTTP error: 400

Can't debug in Windows 10

My specs are:
Windows 10.0.16299.334
Microsoft Edge 41.16299.334.0
Microsoft EdgeHTML 16.16299

VSCode 1.21.1
Debugger for Edge 0.4.1

Project using:
NodeJS 8.11.1
create-react-app v1.1.4

  ›OS: win32 x64
  ›Node version: v7.9.0
  ›Adapter version: 0.0.5
  ›initialize({"clientID":"vscode","adapterID":"edge","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"pt-br"})
  ›attach({"name":"Launch localhost with sourcemaps","type":"edge","request":"launch","url":"http://localhost:3000/","sourceMaps":true,"webRoot":"C:\\Users\\Bruno\\Documents\\Projetos\\my-app/src","diagnosticLogging":true,"__sessionId":"5e10172c-a627-4fd7-b6d8-a66e3f909a7f","port":9222})
  ›Attempting to attach on port 9222
  ›Error: unexpected server response (400)
    at ClientRequest.response (C:\Users\Bruno\.vscode\extensions\msjsdiag.debugger-for-edge-0.4.1\node_modules\ws\lib\WebSocket.js:694:15)
    at Object.onceWrapper (events.js:293:19)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:191:7)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:522:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
    at Socket.socketOnData (_http_client.js:411:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at readableAddChunk (_stream_readable.js:178:18)
  ›To client: {"seq":0,"type":"response","request_seq":2,"command":"launch","success":false,"message":"[debugger-for-chrome] unexpected server response (400)"}
  ›******** ERROR! Unhandled promise rejection: Error: unexpected server response (400)
  ›From client: disconnect({"restart":false})
  ›To client: {"seq":0,"type":"response","request_seq":3,"command":"disconnect","success":true}

How to reproduce:
1- With NodeJS installed, run in cmd (or poweshell): npx create-react-app my-app
2- With VSCode and extension installed, create this launch.json in .vscode folder with this content:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch localhost with sourcemaps",
            "type": "edge",
            "request": "launch",
            "url": "http://localhost:3000/",
            "sourceMaps": true,
            "webRoot": "${workspaceFolder}/src",
            "diagnosticLogging": true,
        }
    ]
}

3- In root folder (my-app), run this command: npm start and close tab of Edge in startup.
4- Finally, try run debugger and this happen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.