sebastian_t
sebastian_t

Reputation: 2879

Break at first line for JavaScript in PhpStorm

I'm trying to figure out the place where certain action takes place in JS spaghetti code.

I got JetBrains IDE Support plugin set and running and it reacts nicely on each breakpoint I define. But what I would like it to do instead is break/stop at the first line of JavaScript code when I click on a button or do anything else that involves some JS processing.

If that is not possible than how can figure out what is being called after I perform certain action on a website?

Upvotes: 0

Views: 209

Answers (2)

Ekaterina Prigara
Ekaterina Prigara

Reputation: 4977

If you don't know where to put the breakpoint, you might try a bit different approach to debugging using spy-js. You need to install spy-js plugin in PhpStorm preferences. It traces your app and shows all the events that are triggered. That might help you to understand where you can then put the breakpoint. You can find more info about spy-js here: https://blog.jetbrains.com/webstorm/2014/04/spy-js-webstorm-secret-service/

Upvotes: 1

Sergey
Sergey

Reputation: 1294

You can take this free codeschool course on devtools to improve your knowledge in debugging. It's free and takes just a few hours.

Upvotes: 0

Related Questions