Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging server side code #33

Closed
nasushkov opened this issue May 18, 2016 · 2 comments
Closed

Debugging server side code #33

nasushkov opened this issue May 18, 2016 · 2 comments

Comments

@nasushkov
Copy link

Hi Thomas,

First of all, thank you for your boilerplate, I played with it for some time and I find it more useful and better structured than more popular ones. Still I don't understand how am I supposed to debug babel-transpired code on a server for this case. Most of the examples that I saw, use gulp to load source maps. Personally, I don't like gulp, and I find it overwhelming to use it only for such a purpose. Can you tell me, is there any better way to do this without gulp?

I also have some suggestions for this boilerplate, but I'd better put them in a separate issue.

Thanx.

@tomatau
Copy link
Owner

tomatau commented May 18, 2016

Hey @nasushkov ! Thanks for your compliments!

For debugging server code I tend to use tests mostly.

For units, you can actually run most of the smaller pieces of server code in the browser unit tests npm test and open localhost:9001... there are some server gotchas but a lot still works. Then you can use the browser's development tooling which is really neat.

Other than that it's a case of just logging to the console :S Have you got the DEBUG env configured in your .env file? I find it very useful.

I've experimented with node-inspector for babel before, but it didn't work very smoothly... I think it's quite an unexplored area, especially as the babel ecosystem is moving so quickly!

Feel free to post the suggestions! Sooner the better too... as I'm currently working on documenting as much as possible!

NB: I do have one small refactor I'm working on for the server render so that the asset control is more visible but it's quite small.

@nasushkov
Copy link
Author

Yes, I use DEBUG. Still I'd like to use breakpoints and other things that are available in a browser. I'll post my suggestions later today. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants