Locate Typescript files from JS files in debugger

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Locate Typescript files from JS files in debugger

Postby johnh » Tue Aug 07, 2018 4:51 pm

Hi,

I've gotten both an internal launcher of the DevTools as well as the remote-debugging option working. All the contents are served up from resources, HTML, JS, .JS.MAP and .TS file.
The Chrome debug view both internal and remote identify that a source map is present as indicated in the header bar but don't seem to show the TS file. Has anyone been able to get a transpiled file with map working ?

Thanks!
John
johnh
Techie
 
Posts: 44
Joined: Wed Aug 01, 2018 12:14 pm

Re: Locate Typescript files from JS files in debugger

Postby magreenblatt » Tue Aug 07, 2018 5:24 pm

What CEF version? Does it work in Google Chrome at the same version?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Locate Typescript files from JS files in debugger

Postby johnh » Wed Aug 08, 2018 3:39 am

It's working/worked in all the versions of Chrome I've been running for some time, currently : Version 68.0.3440.84 (Official Build) (64-bit)

CEF version: 3.3440.1803

Normally the .ts file would show in the file-tree in italic, but for some reason nothing shows up at all (even from Ctrl-P).
Is there any sort of additional handler that I need to implement to load the mapping file?

I put a breakpoint in my resource handler to see which files are being requested and it never looks for the .map or .ts.
johnh
Techie
 
Posts: 44
Joined: Wed Aug 01, 2018 12:14 pm

Re: Locate Typescript files from JS files in debugger

Postby johnh » Fri Aug 10, 2018 3:26 am

Anyone have any ideas on this? or getting the map + related resource working in general ?
johnh
Techie
 
Posts: 44
Joined: Wed Aug 01, 2018 12:14 pm

Re: Locate Typescript files from JS files in debugger

Postby Czarek » Fri Aug 10, 2018 4:52 am

Have you tested with cefclient sample application?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Locate Typescript files from JS files in debugger

Postby johnh » Fri Aug 10, 2018 7:46 am

Hi,

Yes I have with the same result.
The JS file shows in the debugger, the window indicates that a source-map is present, I guess from the comment in the js file which it references.
But the map and the TS file are not included and thus not debuggable.
johnh
Techie
 
Posts: 44
Joined: Wed Aug 01, 2018 12:14 pm

Re: Locate Typescript files from JS files in debugger

Postby amaitland » Fri Aug 10, 2018 8:04 am

What scheme are you using? Http/https?
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1291
Joined: Wed Jan 14, 2015 2:35 am

Re: Locate Typescript files from JS files in debugger

Postby johnh » Fri Aug 10, 2018 8:26 am

I've tried locally on my machine with file:// and http:// and https:// and on a remote server with http:// and https://
same outcome in all cases.

For example:

http://www.terraspace.co.uk/ts/index.html

That file references app.js which includes app.js.map and app.ts file, all present in the same folder.
If you open that link in Chrome (any browser) the debug view will show you the js and via map the ts file too.
ceflient and my app show the js, but make no attempt to process the map or fetch the ts file.
johnh
Techie
 
Posts: 44
Joined: Wed Aug 01, 2018 12:14 pm

Re: Locate Typescript files from JS files in debugger

Postby johnh » Sat Aug 11, 2018 1:58 pm

Ok, this still definitely doesn't work properly in CEF, however I have found a workaround using the Typescript compiler.

By specifying the following options in the tsconfig.json file:

"inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
"inlineSources": true /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */

CEF is now able to see the TS files in the debugger, so this is workable for now.
johnh
Techie
 
Posts: 44
Joined: Wed Aug 01, 2018 12:14 pm

Re: Locate Typescript files from JS files in debugger

Postby fanjunwu » Tue Sep 11, 2018 3:52 am

i using angular 6 to generate web page, use inlineSourceMap and inlineSources in tsconfig.json, but not working
fanjunwu
Newbie
 
Posts: 5
Joined: Tue Aug 23, 2016 7:43 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 54 guests