Use meteor sources for debug

174 views
Skip to first unread message

oak3

unread,
Jan 24, 2015, 6:22:35 AM1/24/15
to meteo...@googlegroups.com
Hi,
I already asked this in meteor talk group, but had no answer so far. Probably this group is better fit for such question. I would like to attach meteor and its packages sources so that when debugging I could step in in the core code. That is very easy with java, but here I am lost. Tried to search but did not find anything. I use WebStorm. What is the best way to do this? I would even like to add node.js sources too, as meteor is based on it. I think it would beneficial to document how to do that so developers get better understanding of framework internals and can be more helpful in its development. And of course sometimes it can be quickest way to catch some bugs.

Rob Fallows

unread,
Jan 28, 2015, 7:18:13 AM1/28/15
to meteo...@googlegroups.com
If you are asking what I think you're asking, you should probably start by reading this: http://www.meteorpedia.com/read/Debugging

oak3

unread,
Jan 28, 2015, 11:24:04 AM1/28/15
to meteo...@googlegroups.com
I already setup debugging for my application with webstorm. However I want to attach sources of meteor-core itself so I could step in that code too when debugging.

Daniel Dornhardt - Daniel Dornhardt Development

unread,
Jan 29, 2015, 3:16:45 PM1/29/15
to meteo...@googlegroups.com
You'll automatically be able to step through the server code, only it's packed into the application package.

You'll need to set a breakpoint in a call after meteor.startup, like this:

  Meteor.startup(function() {
    debugger;
    return Match.test('3', String);
  });

Most of the server code is in this path:

"(your project dir)/programs/server/packages/'

in the debugger.

But you'll have to wait til Meteor.startup(), because otherwise all the sources won't be loaded.

The code may not exactly be structured like in the meteor repository, but you should be able to compare it with the packages/ - folder in the meteor repo.

If you want to edit / change a meteor package temporarily to change something for your specific project, you can clone the whole meteor repo somewhere and only copy the package you want to override to your packages/ - directory, meteor will load it from there then.

Also I have an issue right now in the debugger coming with meteor that I can't click on folders in the "sources" - browser, but I can focus it via mouse click and then navigate it with the arrow keys... :)

Best wishes

Daniel



Daniel Dornhardt, Daniel Dornhardt Development
+49 152 - 56 17 22 61

--
You received this message because you are subscribed to the Google Groups "meteor-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meteor-core...@googlegroups.com.
To post to this group, send email to meteo...@googlegroups.com.
Visit this group at http://groups.google.com/group/meteor-core.
To view this discussion on the web visit https://groups.google.com/d/msgid/meteor-core/50fc2737-5cc1-4bcc-b425-62d413aa1845%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Daniel Dornhardt - Daniel Dornhardt Development

unread,
Jan 29, 2015, 3:18:08 PM1/29/15
to meteo...@googlegroups.com
Also you could use this:  https://github.com/alethes/meteordev and edit the shell script to run your own fork of the meteor repo if you'd like to experiment some more.

Best

Daniel

Daniel Dornhardt, Daniel Dornhardt Development
+49 152 - 56 17 22 61

Reply all
Reply to author
Forward
0 new messages