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
-
I think you can tell either chrome or Firefox Dev tools to break on caught exceptions.
-
donuts238484y@spongessuck but how do I know where that is in the source code? The webapp is huge.
-
jschmold844yUse the npm package http-server (global install)
Run your ng build —prod —apt command, but specifically remove the “minify” from your angular.json settings
After build, run the server in the folder it built to, and replicate the issue. You should locate it easier like this. It’s a trick I use a LOT whenever I get prod-only problems -
Mitm debugging is best option here:
1. Install a proxy
2. Intercept all js requests originating in the browser from your app domain
3. Serve a non-minified local version based on the prod build
4. Win
If you're writing web applications, it is in your best interest to be adept at manipulating network traffic -
jschmold844y@billgates
Let me know if you need help. I have my discord on my profile if you need a quicker response time than on here -
donuts238484y@jschmold thanks, it's actually not urgent at the moment. Whatever the problem was I couldn't reproduce locally so just restarted the server... So hopefully that fixes it for.
Have other projects need to finish. But was just wondering if there was an easy way. -
donuts238484yI mostly work with Java and the non web projects but get pulled into production issues when other ppl can't figure it out... Cuz I'm the "expert" at fixing things... That other ppl fckd up...
-
donuts238484y@jschmold actually I was able to replicate the issue on my local now which has the source code so that is unminified. And I can trace it now.
But say like before this issue only happens in prod for certain users. Seems the only way would be to point a local instance of the app unminified, to prod and tell the user to replicate it on that server? -
jschmold844y@billgates
Pretty much. Angular is fantastic for stupid intermittent colossal breaks because of a data problem -
donuts238484y@jschmold compound that with lazy/novice devs that write shit code usually copied from other shit code
I have a Angular webapp that's minified in production. And it's throwing an error thought it seems to get caught by a catch-all and relayed to a toast message.
Is there anyway to trace it back to the source code?
question