Roku Debugging? - debugging

I do have Roku Express. I really dont know where to start with developing.
I have found where i can learn BrightScript used to build apps for ROKU.
(BrightScript Tutorial)
That is not an issue - but big question is where i can debug such as "channel".
Is there a way that i can use notepad++ and telnet for debugging purposes?
I have found notepad++ highlighter here: NOTEPAD++ BRIGHTSCRIPT HIGHLIGHTER
But i can not find eighter on google or here on stackoverflow how can i debug my application without playing with code and do trial/error, uninstalling, editing, zipping and sending it back to roku for testing.
Thanks for looking and hopefully some one know solution.

You don't need Eclipse for Roku debugging, there is no hidden magic in it.
All you have to do is side-load the ZIP, telnet <roku-IP> 8085 and then either:
interrupt the app with ctrl-C, or
have breakpoint placed in the app via the STOP statement
When execution breaks into debugger, you can type commands directly - check/modify variables, call functions and so on. When finished, resume program execution by typing c and hit Enter

You can do that with Eclipse! Check the link out: https://sdkdocs.roku.com/plugins/servlet/mobile#content/view/4265458.
You can use brihhtscript plug in for the Eclipse that will allow you to edit code, deploy it, debug... You can also use Atom with Roku dev package. You can debug using telent from terminal as well. Check your Roku local IP, open your terminal and type telnet 192.168.1.20(your ip address) 8085.

There is an excellent open source tool for Roku Debugging called VioletBug that I would highly recommend.

Roku Debugging is very easy with the help of the Visual Studio Code. It provides us a way to debug the code with the help of User Interface. Also, it automatically connects you with Roku with the help of telnet and we can use the debug console provided in VSC to print runtime variables and debug code.
More Details - Roku Debugging - VSC

Related

Customizing gdb -tui

Over the years, I just can't seem to find a free debugger that suits me. Normally, I just connect to my university's cluster and use DDT, but I'd like to find something free that I can use locally on my machine. I've been playing with gdb -tui, but it doesn't have a window to show the other project files or a window for watched variables. I can't find a way to open up another file in the project in the source window so that I can scan the source code and see where I want to set my breakpoint. I have to open the other file in vim, find the line number, then set the breakpoint in gdb. I have switched to doing all my code writing in vim, and that seems to work pretty well for me, but I still haven't found a good all-in-one package for debugging the code after I write it. Any suggestions from anybody who have a good code development setup would be greatly appreciated.

Is there any tools for me to inspect which code is being ran?

I wanna to play around the HP webOS, and doing something system level modification. As you may know that the webOS can inspect the source code, and digging inside the system with something like WebOS doctor with ssh. But I would like to inspect when I doing something, which lines of code is being execute, or.... at least which file is being execute, any ideas on that? Thank you.
You can use the Ares debugger - https://ares.palm.com/Ares/docstemp/debug.html
Or if you are developing in Enyo - you can use the Javascript debugger to set watches and breaks in your code. CTRL+SHIFT+J on a windows machine will bring that up.

simple gui based gdb debugging over ssh

I ssh into a linux VM which is setup remotely. I use Vim to write my code. For debugging however, I use netbeans through X11 which can sometimes be painfully slow. I tried using gdb buts its an efficiency killer. I love to hover over my variable and get to now their value rather that doing p variable_name , plus I like see and navigate through the code. Is there something light simple gui based debugging tool I can use. I have tried to use clewn http://clewn.sourceforge.net/ , but that doesnt work because it has a missing netbeans_intg feature. Is there any other similar vim gui based debugging tool ?
You can try ddd
which is a gui for gdb, I think it's lighter than netbeans.
cgdb is an interface to gdb but it is not a graphical one. It does not offer the possibility of hovering over a variable, but it shows you a window with the source code.
Well, I was in sort of your situation sometime ago, and you can have a look at my question about using gdb with remote sources.
First of all, your problem with netbeans_intg feature is related to vim which has been compiled with no support for it. If you can rebuild vim yourself, you can then enable it. Otherwise, as you can see in the answer that I gave myself to my question, you can leverage clewn's remote-vim capabilities.
In a nutshell, you can have a "local" vim (i.e. on a desktop/laptop machine presumably), which must still be built with netbeans_intg support, but now it is a vim under your complete control (i.e. it's on "your" machine), while clewn will run on the linux host where gdb and your debuggee will run.
You can then keep the source files on your desktop/laptop and have the remote clewn sort of "drive" your local vim to the proper source files while debugging.
IOW: clewn will get information out of gdb to know exactly which file/line you're into and connect to remote vim and tell it: "hey, go grab this file and show it around this line", highlighting current line, breakpoints etc.
This is a great solution for when you have far-away deployed systems and you need to debug them with minimum impact on the host where they are running, and presumably no option to transfer there all of your source files.
I don't know if this fits in any way with what you're trying to do, but it did really change things for me.
Hth,
Andrea.
Check out GDB server. Theoretcially, you should be able to start gdb on your linux machine in server mode and connect via GUI of your choice. As long as that GUI supports remote gdb connections, which Netbeans does.

System.Net tracing in PowerShell

I am trying to get tracing set up for PowerShell(ISE) and I came across this link, but I am running debugView, and nothing seems to be happening. Anyone know what I am doing wrong?
Basically my goal is to get tracing for System.Net.WebRequest working in PowerShell. If there is another way to do it, I'd also be open to that.
The answer - which is mine funnily enough - in that link refers to the regular console (powershell.exe) version of powershell. I have to ask some dumb questions:
You created a powershell_ise.exe.config file, not powershell.exe.config, right?
If you're viewing dbgview over remote desktop, you enabled "capture global win32," right?
You have capturing enabled on dbgview, right?
-Oisin

How to tell if (VB) code is running inside Visual Studio?

I'm using VB Express 2008. I know how to tell if code was built in debug more or release, but now I would like know how to tell if it is running in the Visual Studio IDE or not (so that I can add some debug MsgBox() and not worry about them showing if I ever accidentally ship a debug version).
Is System.Diagnostics.Debugger.IsAttached what you're looking for?
If you're building for Test and Prod, consider using a preprocessor directive in your code.
#If DEBUG Then
MsgBox("Foo")
#End If
This falls down, of course, if you ship a debug-built binary to a non-dev environment. I understand this is attacking the problem from another angle from where you asked the question (the IDE).
Try checking the IsAttached property of System.Diagnostics.Debugger
If you want to make sure you never show debug messages to users, you can use Debug.Write() and Debug.WriteLine(). These commands will output the text supplied to the debug output window. Note that you can attack a debug output window to a program running production code on a customer's machine without installing a development environment!
Testing for an attached debugger does not indicate that the debugger is also inside an IDE. It is quite common in many environments to attach debuggers to production code running on a customer system to identify what is going wrong on a particular customer's installation and usage. Testing for a debugger and then presuming you are in an IDE will foul out this usage of debuggers in a production environment.

Resources