![]() ![]() You can save the file by selecting File -> Save from the menu, as shown in the image below. You will need to save the file explicitly before you can actually compile or run your code. Only Chrome and Safari let you do mouse selection of elements while in debugger mode though, so in Edge or Firefox, you might have to do the drilling through the Elements tab to find what you need manually. I have asked the students to download the JDK and jGRASP and reinstall them, but that does not seem to fix the problem. While you have been working with a file in jGrasp, it has not yet been saved to the computer. I tried this, and it works, in Chrome, Firefox, Edge, and Safari, so it’s a pretty cross-browser DevTools friendly trick. setTimeout(function(), 3000) Give yourself a few seconds to get the DOM how you need it, then the debugger will fire and you can inspect as needed. Or (Tim Holman taught me the trick) you can trigger it with a setTimeout() right from the console. You can put that debugger statement right in your code where you need it (remember DevTools has to be open for it to work). Now you can debug the program by clicking on the debug icon (looks like a ladybug). ![]() If your application seems to be unresponsive, you can pause the program to analyze where your code is stuck. You can open one in binary mode, but viewing raw class file contents probably wont be of any use to you. ![]() This is your opportunity to select that otherwise-impossible thing to select and do what you need to do. Pause, resume, restart, or stop the debugger. 1 Add a comment 1 Answer Sorted by: 0 jGRASP doesnt have a class file viewer or decompiler. You can open one in binary mode, but viewing raw class file contents probably won't be of any use to you. No more events are fired and script excecution is completely paused. 1 Answer Sorted by: 0 jGRASP doesn't have a class file viewer or decompiler. The trick is to fire a debugger right when you need itĪ debugger statement, when the DevTools are open, kinda freezes the DOM. This is very useful, but won’t help us here. It doesn’t fire the DOM event, it just simulates the CSS state. Try as I might, I just can’t target that newly-added element for inspection.Ĭhrome DevTools can simulate a :hover style, but that doesn’t really help us here. Say I inserted an element on the mouseenter event of a certain other element, then removed it on mouseleave. The DOM events needed to work with the DevTools themselves can interfere. Right click on something and “Inspect Element”, or, open DevTools and use its selection tools to grab what you need.īut… sometimes it can be difficult or impossible to target the element you need to target in the DevTools. If you need to see (and play with) the styles on any given element, a quick inspection is only a few clicks away. The DevTools (in any browser) are an invaluable development tool for CSS developers. Like jGRASP, the IntelliJ debugger runs your program exactly like it would when running it normally, but it allows you to pause execution on breakpoints. ![]()
0 Comments
Leave a Reply. |