Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loopback mode and pausing on a breakpoint #94

Open
darwin opened this issue Oct 19, 2020 · 2 comments
Open

Loopback mode and pausing on a breakpoint #94

darwin opened this issue Oct 19, 2020 · 2 comments

Comments

@darwin
Copy link
Member

darwin commented Oct 19, 2020

Investigate if it would be possible to evaluate code on a paused breakpoint when using loopback mode.

This is continuation of the discussion: thheller/shadow-cljs#636 (comment)

@lucywang000
Copy link

lucywang000 commented Oct 19, 2020

Continue from thheller/shadow-cljs#636 (comment) :

IIUC this doesn't seem to be able to work. cljs_eval('"foo"') sends the content to shadow-cljs server (through the websocket connection) to parse, which the server compiles down to js code and sends it back to the page to execute. When the page is paused by a breakpoint, there is no way for this to happen.

What's more shadow-cljs server sends ping requests to the client and in a breakpoint the client is not able to respond with a pong, so the server would disconnect the client.

Just for brainstorming, it seems we need somehow to implement a cljs_eval in the dirac dev tools (so it could execute even when the page js runtime is paused at breakpoint) to communicate with shadow-cljs server to compile the cljs code to js and then evaluate it using CDP.

@thheller
Copy link

I could add a no-ping config option if that would help. Also technically if you can open a websocket you have access to everything cljs_eval uses. So you could just get the JS code directly and trigger the eval yourself. Still need to do a full writeup for this though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants