How To Debug A Program With Arguments In VSCode

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ย. 2024

ความคิดเห็น • 45

  • @rwstavros
    @rwstavros ปีที่แล้ว +11

    Well done. Quick, simple, and clearly explained. Not too fast, not too slow and words clearly articulated. Thanks.

  • @coreyrunyon7678
    @coreyrunyon7678 ปีที่แล้ว +3

    Perfect! Straight to the point, informative without over explaining, and the variable information I needed like passing a "-f" parameter. Thank you!

  • @arielpriarone7125
    @arielpriarone7125 11 หลายเดือนก่อน +3

    Finally a video that prioritize the useful informations

  • @5nanometers
    @5nanometers ปีที่แล้ว +3

    Thank you. I had no idea how to debug programs that required terminal arguments. This helps a lot.

  • @pawjast
    @pawjast หลายเดือนก่อน +1

    Nice and simple explanation 👍👍

  • @mpkrass
    @mpkrass ปีที่แล้ว +1

    I was searching for this forever. Thank you!

  • @charalamposkatsoukis8694
    @charalamposkatsoukis8694 10 หลายเดือนก่อน +1

    Absolutely incredible video. Well done Sir! Exactly on point!

  • @simonprentice8153
    @simonprentice8153 6 หลายเดือนก่อน +1

    This video was enough for me to subscribe. Thanks.

  • @IamKhoramdin
    @IamKhoramdin 11 หลายเดือนก่อน +2

    you saved my day. thank you

  • @BruceElgort
    @BruceElgort ปีที่แล้ว +1

    Thank you for this! I did not know about this feature.

  • @kelvinabambora9
    @kelvinabambora9 ปีที่แล้ว +2

    Thank you! Finally, an answer. You my god damn hero! easy subscribe

    • @CaseDigital
      @CaseDigital  ปีที่แล้ว

      Glad I could help! Let me know if there are any other topics that you would like to hear about!

  • @malcolmanderson6735
    @malcolmanderson6735 ปีที่แล้ว +1

    Exactly the video I needed

  • @elainamann7106
    @elainamann7106 10 หลายเดือนก่อน +1

    You are my hero

  • @click9000
    @click9000 10 หลายเดือนก่อน +1

    Thanks. This really help.

  • @detranquoc2608
    @detranquoc2608 ปีที่แล้ว +2

    Thanks, can you make more videos about debugging, like debugging for python file containing imported files

  • @PumpkinEater6699
    @PumpkinEater6699 4 หลายเดือนก่อน +1

    Thanks a ton

  • @paris_mars
    @paris_mars ปีที่แล้ว +1

    Good stuff. Thanks, man.

  • @diogo2381
    @diogo2381 ปีที่แล้ว +1

    Thank you very much for the tip!

  • @1234567mrbob
    @1234567mrbob ปีที่แล้ว +1

    I don't see that option. All the options I see are "Open a folder", which pops open the file open dialog (useless!), and "Show all automatic debug configurations". If I click that I just see a list, from which I select python, and there is no option to create that file. What do I do?

    • @CaseDigital
      @CaseDigital  ปีที่แล้ว +1

      @1234567mrbob if you are seeing that then you will want to click explorer icon on the very top left and the select the open folder button. Choose the folder where the code you want to debug is. Once that has loaded go back to the. Debug icon and you should now see the blue text that says create a launch.json file. It should be there unless you already have launch file.
      To tell if you have a launch folder you can check the explorer tab and see if there is a file called launch.json in a folder called .vscode that is in the root folder that is opened.
      Let me know if that helps

    • @1234567mrbob
      @1234567mrbob ปีที่แล้ว +1

      @@CaseDigital Right. I found the answer. What I ended up doing was to go to the root (C:\), start Vcode, select the folder my script was in, and then I was able to create the launch.json file. From there I could add arguments. Kind of a roundabout way of doing it, so I'll try your approach next time.

    • @jimmydesai9248
      @jimmydesai9248 ปีที่แล้ว +1

      @@CaseDigital Perfect. This was the missing piece for me in the video. Thanks!

  • @fanefierarul
    @fanefierarul ปีที่แล้ว +1

    Thx a lot!

  • @surfettekw
    @surfettekw ปีที่แล้ว +1

    How would you (or could you) run debugger through a series of arguments on the same script … like run script on argument a and then do b and then c…..

    • @CaseDigital
      @CaseDigital  ปีที่แล้ว

      @surfettekw are you going to step through the debugging process with each argument (like do you have breakpoints setup in the script that you will stop at and check values) or are you trying to run different arguments and see what happens?

  • @PatrickSteil
    @PatrickSteil 4 หลายเดือนก่อน +1

    Needed to know how to pass both args like --debug=4 and -k value

    • @CaseDigital
      @CaseDigital  4 หลายเดือนก่อน

      Did this help or is an updated video needed?

    • @PatrickSteil
      @PatrickSteil 4 หลายเดือนก่อน +1

      @@CaseDigital Here is what I had to do... for any who are looking for this also:
      "args": [ "--debug=4", "-k", "test_PROD_400_011" ],

  • @mentefria98
    @mentefria98 11 หลายเดือนก่อน

    what if when I click "create a launch.json file" and then select the python option, nothing happens and I don't get any "launch.json" file?

    • @CaseDigital
      @CaseDigital  11 หลายเดือนก่อน

      @mentefria98 if nothing is created then what you could do is in the root folder of your project create a “.vscode” folder and then within that create a launch.json file and then just write down what you see from the video. This is essentially the manual process to create what that button should do.

  • @billnewsr.9314
    @billnewsr.9314 ปีที่แล้ว +1

    Very Interesting.
    How about a video doing the same but in a Visual Studio Code C# application using MVC?

    • @CaseDigital
      @CaseDigital  ปีที่แล้ว

      Is there something on GitHub that you are using that you would like to see this done with?

    • @billnewsr.9314
      @billnewsr.9314 ปีที่แล้ว +1

      @@CaseDigital python examples are great. I know how to do it... just that you did an excellent job with this video. Expanding the horizons on other style applications in Visual Studio Code is helpful. Thank you!

    • @CaseDigital
      @CaseDigital  ปีที่แล้ว

      That’s a good point thank you for the feedback and I’ll look into it!

  • @pavelgrishin
    @pavelgrishin 7 หลายเดือนก่อน +1

    you could lay out the REQUIRED info a lot faster. You're a programmer to some extent? Heard anything about optimization?

    • @CaseDigital
      @CaseDigital  7 หลายเดือนก่อน

      Thanks for the feedback back I appreciate it! Yea I am a programmer. I have heard of optimization is there something in particular you’re looking to optimize?

  • @ronen2512
    @ronen2512 7 หลายเดือนก่อน +1

    just so much easier on eclipse

  • @raymondfendyj6684
    @raymondfendyj6684 ปีที่แล้ว

    Hey, I was doing the 'parse args' steps but I seemed to need to put the args in the order of the list of args defined, which some of them I do not actually need. Can you help me with this? I have around 40 arguments and would not be using all (some have default values). Thank you!

    • @CaseDigital
      @CaseDigital  ปีที่แล้ว

      Have you tried making your args list in the debugging setup look something like this:
      “args”: [“argName1=val1”, “argname2=val2” …. With only the args you are inputting?
      This should allow you to skip the ordering for the arguments that have default values that you aren’t changing, but the arguments that don’t have default values will need inputted

    • @raymondfendyj6684
      @raymondfendyj6684 ปีที่แล้ว +1

      @@CaseDigital Oh I have resolved it with putting strings to all of my args (even to ints), surprised how it can detect which arg should be int/str/... ! Also tried dict but the args only accept list / string. Thanks for the video :") one of the few walk through that actually answers my question after a few hours of googling

    • @CaseDigital
      @CaseDigital  ปีที่แล้ว

      Glad you were able to resolve your problem. Let me know if there is anything else I can help with!

  • @BenGawiser
    @BenGawiser หลายเดือนก่อน

    This video could've been a sentence. "Use 'args' in your launch file".

  • @thinhlpg
    @thinhlpg ปีที่แล้ว +1

    Thank you!