3

I'm new to Kdevelop, and I'm bumping into a problem when running in debug mode :

I have the simplest possible code , that just prints :

print "Hello World! \n"
print "How are you doing World ?\n"
print "Bye World! \n"

When using Execute , everything works fine, I get the expected ouput. However, in Execute I cannot have any breakpoints (or any debug feature for that matter).

When using Debug mode, I have breakpoints and all the usefull things, but I don't have any output in the Output View Tool Bar.

A sort-of-similar behavior happens when using Kdevelop for C++ :

In debug mode nothing is printed until you print a "\n" (seems to cause some sort of flush).

reference : https://bbs.archlinux.org/viewtopic.php?id=100980

I cannot help to think that these two behaviors are somehow related, so an answer for why in C++ "\n" causes a flush for Kdevelop (and hopefully how to duplicate this in python) might shift me into the right direction.

Things I've tried :

  • sys.stdout.flush(); - no effect
  • using -u argument in the Behavior Script Application Configuration - no effect
  • using python -u as Interpreter Command in the Script Application Conf - "Sorry, debugging is only supported for Python 2.x application"...so parameter shouldn't be here :)

So, any takes on how to print in the debug output for KDevelop when running Python scripts ?

MichaelCMS
  • 4,703
  • 2
  • 23
  • 29

1 Answers1

0

Enable external terminal in launch configuration and build the project again. Finally, start the debugger and the output terminal will open in a new window.

Aadhil
  • 470
  • 7
  • 15