Showing posts with label Hacks. Show all posts
Showing posts with label Hacks. Show all posts

Friday, April 28, 2023

How to debug Python code in VS Code with arguments passed from command line

 Debugging Python code in VS Code with arguments passed from the command line is a straightforward process. Here are the steps you can follow:


1. Open the Python file that you want to debug in VS Code.

2. Set breakpoints in the code where you want to pause and inspect variables.

3. Open the Debug panel in VS Code by clicking on the Debug icon in the Activity Bar or by pressing `Ctrl+Shift+D` on Windows or `Cmd+Shift+D` on Mac.

4. Click on the "create a launch.json file" button and select "Python" as the environment.

5. In the launch.json file that opens, modify the "args" attribute to include the command-line arguments you want to pass to the Python script. For example:


   ```

   "args": ["arg1", "arg2"]

   ```


   Replace "arg1" and "arg2" with the actual arguments you want to pass.

NOTE: Add the below property in the launch.json file.   

"purpose": ["debug-in-terminal"]

6. Save the launch.json file.

7. Start the debugging process by clicking on the "Start Debugging" button in the Debug panel or by pressing `F5`.

8. The code execution will pause at the first breakpoint. Use the Debug Console to inspect variables, and use the Debug toolbar to step through the code and continue the execution.


That's it! You can now debug your Python code with arguments passed from the command line in VS Code.

Saturday, October 29, 2022

Powercube multi socket adapter by allocacoc review


A very useful utility when you are traveling or at home where you have limited power socket outlets.
Powercube multi-socket adapter has 4 number of 3 pin female socket ports & 2 female usb A charging sockets. This is a boon for travelers and gadget freaks that have a lot of devices that require to be charged.
This is also useful when you have limited power sockets at home and you dont want to deal with the messy power strips or wired flex boxes !

Created By Madhukar Rupakumar
Powercube adapter Amazon link - https://amzn.to/3Wax0ah 
Usb A to C female converter from Wayona Amazon link - https://amzn.to/3Wax0ah

 
Follow me on below Social media platforms: Youtube, Twitter, Instagram: krmadhukar 

Wednesday, February 3, 2021

Hack for knowing your forgotten wifi password on your Windows PC/laptop

If you want to find out the password of your wifi connection connected to the internet in your system, type the below command in the command prompt and check the value of the property "Key content" !!

Voilaa... Your wifi password is now shown up on the response on the CLI on your windows PC/laptop screen :)

Disclaimer: Use it to find out the forgotten password of your own internet connection. Do not use it to hack into somebody else's wifi connection :D

C:\>netsh wlan show profile name=<wifi-name> key=clear


Profile <wifi-name> on interface Wi-Fi:

=======================================================================


Applied: All User Profile


Profile information

-------------------

    Version                : 1

    Type                   : Wireless LAN

    Name                   : <wifi-name>

    Control options        :

        Connection mode    : Connect automatically

        Network broadcast  : Connect only if this network is broadcasting

        AutoSwitch         : Do not switch to other networks

        MAC Randomization  : Disabled


Connectivity settings

---------------------

    Number of SSIDs        : 1

    SSID name              : "wifi-name"

    Network type           : Infrastructure

    Radio type             : [ Any Radio Type ]

    Vendor extension          : Not present


Security settings

-----------------

    Authentication         : WPA2-Personal

    Cipher                 : CCMP

    Authentication         : WPA2-Personal

    Cipher                 : GCMP

    Security key           : Present

    Key Content            : <password in clear text>


Cost settings

-------------

    Cost                   : Unrestricted

    Congested              : No

    Approaching Data Limit : No

    Over Data Limit        : No

    Roaming                : No

    Cost Source            : Default


Featured

TechBytes on Linux

This is a growing list of Linux commands which might come handy for the of Linux users. 1. Found out i had to set the date like this: ...

Popular Posts