[txmt-dev] Re: Getting started

Allan Odgaard mailinglist at textmate.org
Wed Sep 26 12:03:27 UTC 2012


On Sep 25, 2012, at 1:55 AM, Charles Crowley <cpcrowley at gmail.com> wrote:

> I am interested in adding some features to TextMate 2. I downloaded
> the distribution and got it to compile and run, but I'm not sure how
> to run the executable in a debugger and get error and log messages.

You can actually run: ninja TextMate/debug

This will launch gdb with TextMate.app loaded and ready to run.

That said, I rarely use a debugger myself. For log messages I think these can be found in Console.app, but with 10.8 this has become less useful, so I added this to main:

	std::string const logFile = path::join(path::home(), "Library/Logs/TextMate.log");
	FILE* fp = freopen(logFile.c_str(), "w+", stderr);
	setlinebuf(fp);

Then I have this running in a terminal:

    tail -f ~/Library/Logs/TextMate.log

> Is there a good reference where I can read about developing Mac
> programs without Xcode?

Did you see https://github.com/textmate/textmate#building-from-within-textmate ?

I mean, just edit the code and hit ⌘B or go to Terminal and run ‘ninja run’…

If you want more of a REPL kind of environment during development, use the tests. Each framework in TextMate has a bunch of tests, add a new one for what you wish to create, while in the test and hitting ⌘B it only runs that test and any potential output from the test is shown in TextMate.



More information about the textmate-dev mailing list