`

使用Flex Debugger 命令行 工具

    博客分类:
  • Flex
阅读更多
 

使用Flex Debugger  命令行 工具

 

    如果你想调试你的应用程序的话,你可以使用Flex Builder进行本地或远程进行调试,但是如果你的机子上没有装Flex Builder的话,你就可以使用命令行 工具 fdb,来进行调试。

 

   为了能够被调试,你首先要做的就是要编译一个debug 版本的swf,这个debug版本的 swf 包含了调试信息,然后你就可以使用一般在C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\bin\fdb.exe (window xp)的 fdb进行调试。

 

   (fdb) help

   (fdb) tutorial

   (fdb) run

   (fdb) set $ invokegetters = 0

   (fdb) set  $listsize= 0

Command

Description

continue

Continues running the application.

file [file]

Specifies an application to be debugged, without starting it. This command does not cause the application to start; use the run command without an argument to start debugging the application.

finish

Continues until the function exits.

next [N]

Continues to the next source line in the application. The optional argument N means do this N times or until the program stops for some other reason.

quit

Exits from the debug session.

run [file]

Starts a debugging session by running the specified file. To run the application that the file command previously specified, execute the run command without any options.

The run command starts the application in a browser or stand-alone Flash Player.

step [N]

Steps into the application. The optional argument N means do this N times or until the program stops for some other reason.

These commands are nonblocking, which means that when they return, the client has at least begun the operation, but it has not necessarily finished it.


 

The following example shows a sample application after it starts:

(fdb) continue 
[trace] ComboBase: y = undefined text_mc.bl = undefined
[trace] ComboBase: y = undefined text_mc.bl = undefined
[trace] ComboBase: y = undefined text_mc.bl = undefined
[trace] ComboBase: y = undefined text_mc.bl = undefined
[trace] ComboBase: y = undefined text_mc.bl = undefined
[trace] ComboBase: y = undefined text_mc.bl = undefined
[trace] ComboBase: y = undefined text_mc.bl = undefined
[trace] RadioButtonGroup.addInstance: instance = _level0._VBox0._Accordion0._For
m2._FormItem3._RadioButton1 data = undefined label = 2005
[trace] RadioButtonGroup.addInstance: instance = _level0._VBox0._Accordion0._For
m2._FormItem3._RadioButton2 data = undefined label = 2004
[trace] RadioButtonGroup.addInstance: instance = _level0._VBox0._Accordion0._For
m2._FormItem3._RadioButton3 data = undefined label = 2005
[trace] RadioButtonGroup.addInstance: instance = _level0._VBox0._Accordion0._For
m2._FormItem3._RadioButton4 data = undefined label = 2006
[trace] ComboBase: y = 0 text_mc.bl = 12
[trace] ComboBase: y = 0 text_mc.bl = 12
[trace] ComboBase: y = 0 text_mc.bl = 12
[trace] ComboBase: y = 0 text_mc.bl = 14
 

 

    设置断点:

Command

Description

break [args]

Sets a breakpoint at the specified line or function. The argument can be a line number or function name. With no arguments, the break command sets a breakpoint at the currently stopped line (not the currently listed line).

If you specify a line number, fdb breaks at the start of code for that line. If you specify a function name, fdb breaks at the start of code for that function.

clear [args]

Clears a breakpoint at the specified line or function. The argument can be a line number or function name.

If you specify a line number, fdb clears a breakpoint in that line. If you specify a function name, fdb clears a breakpoint at the beginning of that function.

With no argument, fdb clears a breakpoint in the line that the selected frame is executing in.

Compare the delete command, which clears breakpoints by number.

commands [breakpoint]

Sets commands to execute when the specified breakpoint is encountered. If you do not specify a breakpoint, the commands are applied to the last breakpoint.

condition bnum [expression]

Specifies a condition that must be met to stop at the given breakpoint. The fdb debugger evaluates expression when the bnum breakpoint is reached. If the value is true or nonzero, fdb stops at the breakpoint. Otherwise, fdb ignores the breakpoint and continues execution.

To remove the condition from the breakpoint, do not specify an expression.

You can use conditional breakpoints to stop on all events of a particular type. For example, to stop on every initialize event, use the following commands:

(fdb) break UIEvent:dispatch Breakpoint 18 at 0x16cb3: file UIEventDispatcher.as, line 190 (fdb) condition 18 (eventObj.type == 'initialize')
delete [args]

Deletes breakpoints. Specify one or more comma- or space-separated breakpoint numbers to delete those breakpoints. To delete all breakpoints, do not provide an argument.

disable breakpoints [bp_num]

Disables breakpoints. Specify one or more space-separated numbers as options to disable only those breakpoints.

enable breakpoints [bp_num]

Enables breakpoints that were previously disabled. Specify one or more space-separated numbers as options to enable only those breakpoints.

 

 

The following example sets a breakpoint on the myFunc()

method, which is triggered when the user clicks a button:

 

 

(fdb) break myFunc

Breakpoint 1 at 0x401ef:file file1.mxml, line 5

(fdb) continue

Breakpoint 1, myFunc() at file1.mxml:5

5ta1.text = "Clicked";

(fdb)
 

 

(fdb) commands 1 
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just 'end'.
>print ta1.text 
>where 
>continue 
>end 
(fdb) cont 
Breakpoint 1, myFunc() at file1.mxml:5
 5ta1.text = "Clicked";
$1 = ""
#0 [MovieClip 1].myFunc(event=undefined) at file1.mxml:5
#1 [MovieClip 1].handler(event=[Object 18127]) at file1.mxml:15
 

 

  

(fdb) bt

 

 

 

 

 

分享到:
评论

相关推荐

    React Native Debugger reactnative可视化调试工具

    在实际使用中,React Native Debugger通常与`react-native-debugger-open`命令行工具结合,以便在启动应用时自动打开调试器。此外,还可以通过`react-native log-ios`或`react-native log-android`命令来收集应用的...

    growingio web端调试插件、debugger、工具、GrowingIO Web Debugger 是基于Chrome浏

    这个目录可能包含了与Chrome开发者工具相关的文件,GrowingIO Web Debugger可能通过扩展这些工具来提供其特有的调试功能。 综上所述,GrowingIO Web Debugger是一个强大的Web调试工具,尤其适用于需要深入理解用户...

    FLex调试时用Debugger版问题

    此问题通常发生在使用Flex Builder进行应用程序开发时,当开发者尝试使用Debugger版本的Flash Player进行调试,但系统未能识别或定位到正确的Debugger版本。这不仅会阻碍项目的进展,还可能引发一系列连锁反应,如...

    Turbo Debugger汇编调试工具

    通过使用命令行界面或热键来控制调试过程,例如设置断点(`bp`),单步执行(`t`),继续执行到下一个断点(`g`),以及查看和修改变量(`dv`)等。 尽管现代的开发环境中,集成开发环境(IDEs)如Visual Studio...

    edb-debugger-master_debugger_

    4. **命令行界面**:除了GUI,EDB还提供命令行界面,适合那些喜欢使用命令行工具或者需要脚本自动化调试任务的用户。 5. **调试协议支持**:EDB支持GDB(GNU调试器)协议,这意味着它可以与各种目标系统配合使用,...

    Flex调试工具 IE Firfox

    本文将详细介绍如何在Internet Explorer(IE)和Firefox浏览器中使用Flex调试工具。 1. **Flex Builder集成开发环境**: Flex Builder是Adobe提供的IDE,内置了强大的Flex调试工具。它支持Eclipse平台,提供代码...

    一站式页面调试工具Spy-Debugger.zip

    第二步:命令行输入spy-debugger,按命令行提示用浏览器打开相应地址。 第三步:设置手机的HTTP代理,代理IP地址设置为PC的IP地址,端口为spy-debugger的启动端口(默认端口:9888)。 第四步:...

    HTT-Debugger-Pro-v9.11.zip 抓包工具

    软件/插件标签表明,HTTP Debugger Pro既可以作为一个独立的应用程序运行,也可以作为浏览器插件使用,使得在网页开发和测试过程中实时监控HTTP通信变得更为便捷。它可能提供与多种流行浏览器的集成,如Chrome、Fire...

    flex编译

    1. **Flex SDK**:Adobe Flex SDK是一套用于构建Flex应用程序的免费工具集,包含了编译器、模拟器和命令行工具,允许开发者使用MXML和ActionScript进行开发。 2. **MXML**:MXML是一种声明式语言,用于定义Flex应用...

    Immunity Debugger 是一款逆向工程调试器,Mona.py 是一个 Windows 平台上的漏洞利用开发辅助工具

    Immunity Debugger 是一款功能强大、灵活可扩展的逆向工程调试器,它在二进制文件分析、漏洞利用和恶意软件分析等方面具有广泛的应用价值。 Mona.py 是一个 Windows 平台上的漏洞利用开发辅助工具,它可以自动化执行...

    微软推荐的JS脚本调试工具及用法说明 ie下脚本调试工具 Microsoft Script Debugger

    尽管如此,对于还在使用旧版IE或需要处理兼容性问题的开发者来说,Microsoft Script Debugger仍是一个有价值的工具。 总的来说,Microsoft Script Debugger是针对IE浏览器的一个强大辅助工具,它提供了一套全面的...

    cc-Debugger使用手册

    CC-Debugger使用手册主要介绍了CC-Debugger这一款调试工具的使用方法,这款调试工具主要用于调试和下载运行在CCxxxx 8051-based System-on-Chip(SoC)的设备。CC-Debugger的操作系统支持包括Microsoft®Windows®2000...

    qt Creator Debugger vs2013工具

    在谈到“qt Creator Debugger vs2013工具”时,我们关注的是如何在Qt Creator中利用Visual Studio 2013(MSVS2013)的调试工具。虽然Qt Creator内置了调试器,但有时开发者可能更倾向于使用Visual Studio的调试功能...

    httpdebugger调试工具,HTTP通信信息进行捕获、分析和调试

    httpdebugger是为网站开发者设计的调试工具,可以对客户端浏览器和网站服务器 之间所有的HTTP通信信息进行捕获、分析和调试。Internet 软件开发者能利用HTTP Debuger来分析他们的程序和互联网之间的通信。

    Pure JS (6.1):使用 Rhino Shell 和 Debugger 运行和调试 JS

    Rhino是Mozilla开发的一个开源JavaScript引擎,它允许JavaScript在Java平台上运行,而Rhino Shell则是一个命令行工具,可以用来交互式地执行JavaScript脚本。Debugger则是用于检查和优化代码的工具,这对于理解和...

    经过修改的flex商城

    开发者可以使用Flash Builder这样的集成开发环境,或者命令行工具进行开发。 6. **电子商务功能**: Flex商城可能包含了常见的电商功能,如商品浏览、购物车、结账流程、订单管理、用户账户系统等。这些功能需要与...

    Flex flashplayer_10_ax_debug

    Flex Debugger是Flex开发工具的一部分,它与Flash Player的Debug版本结合使用,允许开发者在运行Flex应用程序时查看详细的错误信息,监控变量值,以及跟踪代码执行流程。这对于解决运行时错误和性能问题非常有用。...

    Boot_debugger_

    这是一个功能强大的命令行工具,支持内核模式和用户模式的调试,以及崩溃转储分析。 2. 调试模式:要进行启动调试,必须先开启目标计算机的调试模式。这可以通过修改BIOS设置或使用BCDEdit工具完成。 二、设置启动...

    CC Debugger Driver.zip

    "CC Debugger Driver.zip" 是一个包含了CC Debugger Driver的压缩文件,这个驱动程序主要用于与使用CC Debugger的嵌入式系统进行通信。CC Debugger通常是一个硬件调试工具,它允许开发者对基于某些微控制器或嵌入式...

    JScript Debugger JS调试工具

    **JS调试工具——JScript Debugger WT-JS v2.7.0** JavaScript,简称JS,是一种广泛应用于网页和网络应用开发的脚本语言,由Netscape公司的Brendan Eich在1995年发明。它通常与HTML和CSS一起使用,用于实现客户端的...

Global site tag (gtag.js) - Google Analytics