Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add argument checking on pdb commands #103464

Closed
Labels
type-featureA feature request or enhancement
@gaogaotiantian

Description

@gaogaotiantian

Feature or enhancement

Add some argument checking on pdb commands so it is not ignored silently

Pitch

Currently for some pdb commands, we simply throw out provided arguments and proceed. This could confuse users. A super common case that I had (more than a few times) was this:

(Pdb)a=1(Pdb)

Guess what it does? It lists all the arguments to the function(which was empty). The command succeeded (in a way the user would never expect) without any kind of warning.

Similar thing forstep ornext, which does not take any argument.gdb and some other debuggers provide a count for such commands, so people might do

(Pdb)step3

Andpdb just does astep. Normally the user would expect it does something different thanstep, but that's not the case. Of course it has the similar issue when the user doess = "abc" - surprise! the code goes forward!

We should catch these cases (and it's pretty cheap) and let the users know it's not the correct way to use the command (or for most cases, let them know that this IS actually a command).

So we could have something like:

(Pdb)a=1***Invalidargument:=1Usage:a(rgs)(Pdb)step3***Invalidargument:3Usage:s(tep)(Pdb)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp