Discussion:
[wingide-users] WINGHOME
Daniel Montecillo via wingide-users
2018-03-18 15:31:56 UTC
Permalink
Hello, Fellow WingIDE Users,

I am curious if setting up the WINGHOME path in the wingdbstub.py is with the quotes or without the quotes. I am configuring WingIDE to debug externally lunch code.

WINGHOME = /Applications/WingIDE.app

[cid:8C49BFE4-EAE9-4CEC-B2B3-***@nsc1.nr.wp.shawcable.net]

I tried both but it seems I can't make it work.
I am using a Mac.

Thanks,
Daniel
Wingware Support via wingide-users
2018-03-18 23:51:31 UTC
Permalink
If you're modifying wingdbstub.py, quotes are needed (it's a python
string) but no quotes are needed if you're setting an environment variable.

How are you setting WINGHOME?

Thanks,

John
Post by Daniel Montecillo via wingide-users
Hello, Fellow WingIDE Users,
I am curious if setting up the WINGHOME path in the wingdbstub.py is
with the quotes or without the quotes. I am configuring WingIDE to debug
externally lunch code.
WINGHOME = /Applications/WingIDE.app
I tried both but it seems I can't make it work.
I am using a Mac.
Thanks,
Daniel
_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Daniel Montecillo via wingide-users
2018-03-19 00:08:05 UTC
Permalink
Hi John,

Thank you for your reply. I am setting up wing home for debugging Python scripts executed outside WingIDE (externally launched code).

Basically, what I am doing is that I am following the tutorial on this link<https://wingware.com/doc/intro/tutorial-debugging-remote> and I am using the tutorial files to for me to get familiar with it.

However, I can’t make the debugger capture the breakpoints and the exception from the tutorial file (example2.py).

My windbstub.py:

#------------------------------------------------------------------------
# Find Wing debugger installation location

# Edit this to point to your Wing installation or set to None to use env WINGHOME
# On OS X this must be set to name of the Wing application bundle
# (for example, /Applications/WingIDE.app)
WINGHOME = ‘/Applications/WingIDE.app/Contents/MacOS'

I also tried ‘/Applications/WingIDE.app/'


Thanks,
Daniel




On Mar 18, 2018, at 5:51 PM, Wingware Support <***@wingware.com<mailto:***@wingware.com>> wrote:

If you're modifying wingdbstub.py, quotes are needed (it's a python string) but no quotes are needed if you're setting an environment variable.

How are you setting WINGHOME?

Thanks,

John

On 3/18/18 11:31 AM, Daniel Montecillo via wingide-users wrote:
Hello, Fellow WingIDE Users,
I am curious if setting up the WINGHOME path in the wingdbstub.py is with the quotes or without the quotes. I am configuring WingIDE to debug externally lunch code.
WINGHOME = /Applications/WingIDE.app
I tried both but it seems I can't make it work.
I am using a Mac.
Thanks,
Daniel
_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Daniel Montecillo via wingide-users
2018-03-20 04:16:00 UTC
Permalink
John,

I manually created the debug_log.log file then I added the path string to the kLogFile variable in wingdbstub.py. I deleted the file but kept the path string assigned to the variable, but there was no debug_log.log file created.

I assigned the kExitOnFailure variable to true, but still the same, every time I'm running the example2.py code in the terminal, the debugger wasn't able to attach to the process.

I did try doing the same process on my other machine and still, the debugger is not capturing the breakpoint and exception in the tutorial file.

I will try doing more experiment and see what I other method that will enable me to make this work. I think I will succeed with more patience and diligence.

Thanks,
Daniel


On Mar 19, 2018, at 7:56 AM, Wingware Support <***@wingware.com<mailto:***@wingware.com>> wrote:

On 3/19/18 12:28 AM, Daniel Montecillo wrote:
Sorry, I forgot to include in my earlier email that the log file was empty. No information has been recorded on it. I will continue to work and investigate on how I will be able to make it work.

Was the /Users/danielmontecillo/Documents/Software_Development/Python/wing_tutorial/tutorial/debug_log.log file created? It would be odd if it were created but left empty. Could you remove it and try debugging again?

Could you also set the kExitOnFailure variable to True in wingdbstub?

Thanks,

John
Daniel Montecillo via wingide-users
2018-03-22 13:24:47 UTC
Permalink
John,

I did try working on it again and I did what you had suggested. I also copied the wingdebugpw file into the same folder where the wingdbstub.py was located.

This is the result of running it in the terminal.
I will be working on it again in the next few hours if I can zero in on what caused it not to run.

(Generic) Daniels-iMac:tutorial danielmontecillo$ python example2.py
Starting up...
This code runs outside of the debugger
Now starting the debugger and attaching to the IDE
Traceback (most recent call last):
File "example2.py", line 13, in <module>
import wingdbstub
File "/Users/danielmontecillo/Documents/Software_Development/Python/wing_tutorial/tutorial/wingdbstub.py", line 273, in <module>
raise ValueError('Not connected')
ValueError: Not connected
(Generic) Daniels-iMac:tutorial danielmontecillo$


Thanks,
Daniel

On Mar 20, 2018, at 7:19 AM, Wingware Support <***@wingware.com<mailto:***@wingware.com>> wrote:

Can you verify that you are importing the wingdbstub that you're modifying? You can do this by either inserting a syntax error into the file (e.g. add a line: this is invalid python) or by adding print(wingdbstub) after the import wingdbstub and then looking at the filename printed.

Thanks,

John

On 3/20/18 12:16 AM, Daniel Montecillo wrote:
John,
I manually created the debug_log.log file then I added the path string to the kLogFile variable in wingdbstub.py. I deleted the file but kept the path string assigned to the variable, but there was no debug_log.log file created.
I assigned the kExitOnFailure variable to true, but still the same, every time I'm running the example2.py code in the terminal, the debugger wasn't able to attach to the process.
I did try doing the same process on my other machine and still, the debugger is not capturing the breakpoint and exception in the tutorial file.
I will try doing more experiment and see what I other method that will enable me to make this work. I think I will succeed with more patience and diligence.
Thanks,
Daniel
On Mar 19, 2018, at 7:56 AM, Wingware Support <***@wingware.com<mailto:***@wingware.com> <mailto:***@wingware.com>> wrote:

On 3/19/18 12:28 AM, Daniel Montecillo wrote:
Sorry, I forgot to include in my earlier email that the log file was empty. No information has been recorded on it. I will continue to work and investigate on how I will be able to make it work.

Was the /Users/danielmontecillo/Documents/Software_Development/Python/wing_tutorial/tutorial/debug_log.log file created? It would be odd if it were created but left empty. Could you remove it and try debugging again?

Could you also set the kExitOnFailure variable to True in wingdbstub?

Thanks,

John

Daniel Montecillo via wingide-users
2018-03-19 04:17:52 UTC
Permalink
Hi John,

So I did what you had instructed and I also did some extensive reading. I still can't make it work. I configured the kLogFile to this:

# Set this to a filename to log verbose information about the debugger
# internals to a file. If the file does not exist, it will be created
# as long as its enclosing directory exists and is writeable. Use
# "<stderr>" or "<stdout>". Note that "<stderr>" may cause problems
# on win32 if the debug process is not running in a console.
# (WINGDB_LOGFILE environment variable)
kLogFile = '/Users/danielmontecillo/Documents/Software_Development/Python/wing_tutorial/tutorial/debug_log.log'


After trying running the debugger to run the example2.py code multiple times the debugger still not accepting the connection as indicated by the grey bug icon.

Thanks,
Daniel


On Mar 18, 2018, at 5:51 PM, Wingware Support <***@wingware.com<mailto:***@wingware.com>> wrote:

If you're modifying wingdbstub.py, quotes are needed (it's a python string) but no quotes are needed if you're setting an environment variable.

How are you setting WINGHOME?

Thanks,

John

On 3/18/18 11:31 AM, Daniel Montecillo via wingide-users wrote:
Hello, Fellow WingIDE Users,
I am curious if setting up the WINGHOME path in the wingdbstub.py is with the quotes or without the quotes. I am configuring WingIDE to debug externally lunch code.
WINGHOME = /Applications/WingIDE.app
I tried both but it seems I can't make it work.
I am using a Mac.
Thanks,
Daniel
_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Loading...