Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
mojo20128146yJS in general is not a very helpful language... one if the worst regarding debugging.
And no, with debugging I don‘t mean putting console.log on every second line ... -
jgwinner1006y@mojo2012 Right! Been there done that ... reminds me of the early days in Assembler or something. No debuggers, etc. You'd think we'd come further by now!
-
mojo20128146y@jgwinner every year or so I gove JS a try. The last couple if months I was playing around with react-admin and vue-storefront.
And every year again I wonder how JS devs manage to stay sane somehow.
Debugging a react babel redux webpack app? Umm well good luck mister. Better stop and shot yourself in the foot... -
Jifuna37416yIt's probably your own console log. Try console.log("Error: ", errorObject) or console.log("Error: " + JSON.stringify(errorObject));
(Or console.error)
That you don't fully understand a language doesn't mean it sucks.
And about the debugging part, in vscode for example you can debug javascript and nodejs. -
mojo20128146y@Jifuna yeah, I know. But uf you are used to what debugging mean (debugging into conpiled code from anywhere, breakpoints just working, instead of being randomly ignored, sourcecode that is bust always properly aligned to the debugger) ur f...d with JS
-
mojo20128146y@Jifuna then ur lucky, or ur just used to how it works and therefore cant compare it to superior solutions. Happens to me all the time, talking to people who never had a problem and then I see how the actually debug, lie with sticks n stoned like in the stone age unable to see how it could be done better
-
inaba46256y@mojo2012 Just like Jifuna I've never had any of those problems in either VSCodes or the browsers debugger.
-
mojo20128146y@telephantasm so please enlighten me. Checkout vie-storefront and debug into the gzip compression library.
Because it failed me with a EOF stream exception on a rest endpoint, worked in the browser though.
No useful logging, no hints, no breakpoints out if the box, bc vscode typescript babel wepback kinda screwed all up.
If you can show me how u can do this, I‘d be very thankful.
And btw it should work wothout modifying any of the dependencies, just with a click on the breakpoint sidebar in any sourcefile.
Thanks in advance -
@Jifuna or console.dir
console.dir let's you view the object tree inside the browser console, rather than all the mess at once. Sure you can always use JSON.Stringify -
mojo20128146y@inaba so show me how u even find the proper line if code in a webpack babel perverted sourcfile of a dependency (in a browser)
-
inaba46256y@mojo2012 How do you find the "proper line if code" in a disassembled 6502 binary? Or how about just an ordinary binary?
Of course if you have to debug other peoples compiled or transpiled code without labelfiles or sourcemaps it's going to be difficult. -
mojo20128146y@inaba In java you can set a breakpoint in any compiled or not compiled library class. It doesnt matter what settings, toolchsin, buildtool, deployment artifactory the author chose.
In theory you can chose to not create debug symbols (like source maps in java), but in 15 y of java i only had that once ir twice. Whereas with JS this is the regular case. You have to customize and tweak every frigging project and still it feels so subpar.
Related Rants
ERROR Error: "[object Object]"
How is THAT supposed to be helpful?
question
js
firefox
angular