How can I get debug log in Mavensmate

Following a lot of people’s advice, I am trying to use Mavensmate. Coming from developer console, there are still things I am not used to. One thing is I can’t find where the debug log is. I tried everything I can think of under Mavensmate > debugging, but it seems to just processing for a while and then tell me it is a pass – but where is the log?

I assume that the debug log is not auto-generated like in developer console – so need to generate either a quick or debug log before opening it. Is that correct?

Answer

It looks like you need to first start the log capturing process via:

MavensMate > Debugging > New Debug Log

Start Log capturing in MavensMate

Then perform your actions that will be logged.

Finally, pull the resulting logs down using

MavensMate > Debugging > Fetch Logs

By default they will be placed in project/debug/logs and should appear in the folders ready to be opened.

Open Debug log in MavensMate


As an interesting aside. When you do an “New Debug Log”, MavensMate will create a new TraceFlag record via the tooling API:

TraceFlag

This tells Salesforce the type of logs to capture, the logging levels, and when to stop capturing them.

You can then query the ApexLog sObject to get the resulting ids and pull the log bodies down.

Attribution
Source : Link , Question Author : Lance Shi , Answer Author : Daniel Ballinger

Leave a Comment