Right, well, that's a pretty nonstandard use-case; I've done a fair bit
with therubyracer for server-side JS execution, but almost nothing with
debugging it (other than testing the JS code with rspec).  It does use an
underlying library which might give you more access to the v8 context for
debugging, but I haven't really had much of a look down there.


On Tue, Jul 1, 2014 at 12:37 PM, Chris Berkhout <[email protected]>
wrote:

> Hi Anthony,
>
> I'm not sure about therubyracer, but with Node you can easily attach a
> chrome-style debugging UI to live JS code using this:
> https://github.com/node-inspector/node-inspector
>
> It requires the user to open a page in chrome or opera, but otherwise
> works really well. The client browser just needs to load what's served on a
> particular port and there are command line options to have it automatically
> break on the first line if necessary.
>
> I suppose you can run whatever you like in the JS console, so by the
> sounds of it you might need to find a way to lock it down to an appropriate
> level.
>
> Hope that help!
> Chris
>
>
>
> On Mon, Jun 30, 2014 at 9:19 PM, Anthony Richardson <[email protected]>
> wrote:
>
>> Hi Simon,
>>
>> Since our app is self-hosted by the client on their hardware we are happy
>> to allow the "expert" user the ability to use breakpoints and steps with
>> variable inspection even if this ties up a process during the debugging
>> session.
>>
>> Ideally I see the user put the server into "debug" mode for a specific
>> script and then they connect to the paused process to step the script once
>> it is triggered. The connection may be from a chrome browser using the
>> inbuilt dev tools or a web page with embedded tools for stepping the code
>> and visualising the variables.
>>
>> I don't anticipate the user being able to live edit code etc.. This would
>> be more an observation capability.
>>
>> We are open to any suggestions based on people experience or available
>> tools.
>>
>> Cheers,
>>
>> Anthony Richardson
>>
>>
>> On Tue, Jul 1, 2014 at 10:15 AM, Simon Russell <[email protected]>
>> wrote:
>>
>>> What sort of debugging facility are you looking to provide?
>>>
>>>
>>> On Tue, Jul 1, 2014 at 10:40 AM, Anthony Richardson <[email protected]>
>>> wrote:
>>>
>>>> Hi All,
>>>>
>>>> We are looking at introducing the ability for "expert" users to write
>>>> business processes in javascript (or say blockly compiled to javascript)
>>>> and have these short pieces of code executed on the server using
>>>> therubyracer in response to system triggered events.
>>>>
>>>> This in itself is easy to do. However, we need to provide the ability
>>>> for these "expert" users of our system to be able to debug these scripts. I
>>>> have done a little googling using Chrome browser to debug server side
>>>> scripts etc.. but found nothing specific the the rails and therubyracer
>>>> environment. I'm confident we can get something working but wanted to see
>>>> if anyone in the community has experience with this or know of any
>>>> resources related to this that would be useful.
>>>>
>>>> Cheers,
>>>>
>>>> Anthony Richardson
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Ruby or Rails Oceania" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at http://groups.google.com/group/rails-oceania.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Ruby or Rails Oceania" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/rails-oceania.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby or Rails Oceania" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/rails-oceania.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby or Rails Oceania" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/rails-oceania.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rails-oceania.
For more options, visit https://groups.google.com/d/optout.

Reply via email to