Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pycharm debug help
#1
Hi Team,

how to debug in pycharm ?
in a situation where I am accepting input value via command line argument.

But when I run python script via command line, I am not unable to debug.

import sys

def main(iCnt):
    for i in range(iCnt):  # I have put break point
        print(i)


if __name__ == "__main__":
    iCnt = int(sys.argv[1])
    # iCnt = 10
    main(iCnt)
Reply
#2
google "debug pycharm commandline arguments". At the top of the list:

https://www.jetbrains.com/help/pycharm/r...ython.html

Whenever you have any questions about pycharm, jetbrains is the first place you should look for an answer.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python debug suddenly got bad ben1122 3 1,112 Sep-03-2022, 06:20 AM
Last Post: ben1122
Bug Help Debug please jamesaarr 12 3,881 Jul-28-2021, 11:20 PM
Last Post: Pedroski55
  Error in Int object is not subscript-able. How to debug this ? yanDvator 1 2,239 Aug-03-2020, 02:28 PM
Last Post: Larz60+
  is there a debug mode available while creating python egg BhushanPathak 1 2,375 Dec-19-2018, 04:15 PM
Last Post: Larz60+
  Help debug my fibonacci implementation dineshpabbi10 6 4,003 May-16-2018, 12:12 PM
Last Post: dineshpabbi10
  Not sure how to debug this? rsmldmv 3 5,460 Nov-09-2017, 02:51 AM
Last Post: snippsat
  Debug and trace in python quocchi22101262 0 3,496 Jun-20-2017, 09:35 AM
Last Post: quocchi22101262

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020