Can I debug a mongo script?

995 views
Skip to first unread message

Eric J. Van der Velden

unread,
Apr 7, 2014, 12:20:19 PM4/7/14
to mongod...@googlegroups.com
Hello,

I have a mongo script,  foo.js and I do

$ mongo foo.js

Can I instead somehow step through the code?

Thanks,

Eric J.

monosij...@gmail.com

unread,
Apr 7, 2014, 6:40:50 PM4/7/14
to mongod...@googlegroups.com
I believe you can in the Chrome JS debugger. Firefox has it as well.

Nicolas CUVILLIER

unread,
Apr 8, 2014, 6:44:28 PM4/8/14
to mongod...@googlegroups.com
How can you debug javascript code running under mongo binary with chrome or Firefox ?

Nicolas

David Hows

unread,
Apr 14, 2014, 12:26:15 AM4/14/14
to mongod...@googlegroups.com
Hi Eric,

There are no debuggers you can use as such.

You could try running each line in the MongoDB shell or adding prints() in relevant places.

Regards,
David

Eric J. Van der Velden

unread,
Apr 14, 2014, 4:41:01 AM4/14/14
to mongod...@googlegroups.com
Thanks.

Eric J.


--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/VCpe8Bx_a7o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/19f86b09-d5fa-421b-859f-2caba353a9bc%40googlegroups.com.

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

Reply all
Reply to author
Forward
0 new messages