Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What in particular do you feel is so special about the JS debugging experience?

I've done a lot of debugging on Python, Java and C++ over the years and never felt like I was missing tools (although I certainly met plenty of people that were ignorant of their options in this regard...)



I switched to c# dev from web a couple years ago and am baffled there’s no built in way to see the network requests my app is making when debugging


Right...but how would this work tho?

Since on a more open platform like the CLR, JVM Python interpreter or bare metal (as opposed to a controlled sandbox like the browser) there are many different network traffic libraries dealing with all kinds of different ways of communicating (everything from basic HTTP to binary protocols for communicating with hardware like DNP3).

How would the standard debugger hook into all these different libraries? I'm assuming they'd have to implement hooks and maintain them too, nevermind if there's more than one debugger available to be supported.

Seems like a lot of effort compared to just using a tool like Wireshark or, for HTTP stuff, a MITM proxy...


Lol been waiting patiently for that for 20 years in .Net. Such an obvious gap.


Java’s/Spring’s hot swapping is clearly inferior in my experience, but of course the main benefit comes from that it takes less than a sec to “restart a page”, while a full blown ApplicationContext init usually takes way more. Also action history of Redux is something which I’ve never seen in Java, but of course there is usually no central store like in Redux. Another easier thing is to rewrite UI on the fly at any time with zero restrictions. Compared to Groovy for example, or any other things which generate code (e.g Lombok, JSP pages), it’s way easier to debug non native code with sourcemap files, which is defacto standard in JS code generation. Also for JS you have all of the code which is running in the browser, for standalone containers like Wildfly you still need to add their code, and sometimes many other things like extensions.


Sure, those are pretty interesting points but I feel like there is a bit of difference between the environment of a browser and that of a runtime like the JVM which tends to explain why certain debugging tools exist in one environment and not the other.

For the same reason it doesn't seem that useful to bring in very environment-specific stuff like Redux.


There are website view frameworks for Java, so at the end, many times, it’s not that different. Hotswapping Thymeleaf templates for example works quite well, but the only option is refreshing, while it’s not an inherent restriction.

I had an example for Redux, because one of my pain is that there is no larger view framework for Java, which can’t access JNDI. In other words, nothing stops anybody to create something like Redux, just the view layer shouldn’t be able to access anything else except the model. Even now, it is an antipattern in my opinion to reach anything from the view which has a state and it’s not in the model. Jakarta MVC, Spring MVC, and Struts are close to this, JSF’s model is the JNDI itself, so it’s even easier to write way worse spaghetti code.


Inspect Element




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: