如何在执行某些行后仅在断点处停止?(How to only stop at a breakpoint after some line was executed?)
通常,我想在调试时暂停一个特定的行,但只在执行另一行之后。 通常,这个JavaScript代码是机器生成的(例如,通过JSP或PHP),或者应该构建(例如,通过Grunt),每次我想添加断点时都会有点烦人。 在这种情况下如何停在特定的线路?
例如,我有两个函数,
f_a()
和f_b()
以这种方式调用:for (var i = 0; i < 1000; i++) { f_a(); } f_b(); f_a();
( 运行示例 )
我想在
f_a()
添加一个断点,但只在调用f_b()
后才停止在此函数。 怎么做?Frequently, I want to pause at a specific line while debugging, but only after another line was executed. Often, this JavaScript code was machine-generated (for example, by JSP or PHP), or should be built (e.g. by Grunt), which can be a bit annoying to do every time I want to add a breakpoint. How to stop at a specific line in this case?
For example, I have two functions,
f_a()
andf_b()
that are called this way:for (var i = 0; i < 1000; i++) { f_a(); } f_b(); f_a();
I want to add a breakpoint inside
f_a()
, but only stop at this function afterf_b()
is called. How to do that?
原文:https://stackoverflow.com/questions/38078643
最满意答案
您是否尝试为vaadin-client添加运行时范围?
喜欢这个:
<dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-client</artifactId> <version>${vaadin.version}</version> <scope>runtime</scope> </dependency>
Did you try adding the runtime scope for vaadin-client?
Like this:
<dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-client</artifactId> <version>${vaadin.version}</version> <scope>runtime</scope> </dependency>
相关问答
更多-
您可以按照提供标记这些依赖关系:
xerces xerces 2.4.0 provided -
如何使用Maven在WAR档案WEB-INF / lib中包含JAR?(How to include JARs in WAR archive WEB-INF/lib using Maven?)[2021-12-23]
只要确保你的pom类型是war 。 Maven的默认行为是复制 lib文件夹中的依赖项。 PS如果你发现任何麻烦发布你的完整pom。 除了进一步的文档,请参阅maven war插件 Just make sure the type of your pom is war. Maven's default behavior is to copy dependencies in the lib folder. P.S. If you found any trouble post your full pom. Bes ... -
您确定为您正确设置了${version}吗? 如果您需要当前项目的版本,您可能应该使用
${project.version} 并可能设置来为您处理。 Are you certain that ${version} is being set properly for you? If you need the version of the current project, you should probably be using < ... -
根据内置生命周期绑定战争包装在包装阶段战争:战争mojo被称为。 你可以打电话给以前的'prepare-package'阶段 - 所有的动作都会被执行,之后这个mojo的战争:爆炸 mvn prepare-package war:exploded 结果将与你的结果一样,但没有创造任何战争。 According builtin lifecycle bindings for war packaging in package phase war:war mojo is called. You can call ...
-
从maven部署WAR(Deploying WAR from maven)[2022-01-07]
存在一个属性${project.build.directory} ,该属性导致您的“目标”目录的路径。 (请参阅: 这里 ) 也许这对你有帮助? There exists a property ${project.build.directory} that results in the path to your "target" dir. (See: here) Maybe that helps you? -
如果你看看内置的生命周期参考,你会发现在
war 生命周期的任何阶段都不会出现任何阶段的war:manifest目标。 因此默认情况下这个目标不会执行(除非你添加一个执行)。 如果${basedir}/src/main/webapp/META-INF/MANIFEST.MF有MANIFEST.MF文件,那么当war:war目标正在执行时,它将使用该文件而不是生成MANIFEST.MF直接将它嵌入.war文件而不创建中间文件。 从我所知道的情况来看, war:mani ... -
您是否尝试为vaadin-client添加运行时范围? 喜欢这个:
com.vaadin vaadin-client ${vaadin.version} runtime -
使用maven从命令行更改生成的war文件的名称(Changing the name of the generated war file from command line with maven)[2023-04-12]
您可以通过maven属性实现相同的效果。 1)通过定义一个属性xxx ${my.warName}