0

This TextMate 2 bundle command:

echo $TM_FILEPATH
echo $TM_LINE_NUMBER
open codebug://send?file="$TM_FILEPATH"&line="$TM_LINE_NUMBER"&op="add"&open="1"

generates this echoed output:

    /Users/bob/Dropbox/SyncedSites/vhosts/www.br.dev/user/plugins/topicmenu/topicmenu.php
56

It launches Codebug, but does not open the referenced file nor set a breakpoint at the specified line.

What have I done wrong?

Bob Rockefeller
  • 4,492
  • 2
  • 28
  • 35

1 Answers1

0

With some help over on the #textmate IRC from inifinight, this is what worked:

#!/usr/bin/env ruby18

require "#{ENV['TM_SUPPORT_PATH']}/lib/escape.rb"

`open "codebug://send?file=#{e_url(ENV['TM_FILEPATH'])}&line=#{ENV['TM_LINE_NUMBER']}&op=add&open=1"`
Bob Rockefeller
  • 4,492
  • 2
  • 28
  • 35