Intellij 12 not stopping at a breakpoint
Hi,
I just upgraded to Intellij 12 and I am investigating the jasypt (Java Simplified Encryption) library, http://www.jasypt.org/,
- checked out the source from https://jasypt.svn.sourceforge.net/svnroot/jasypt/trunk/jasypt/
- created a project, made the following changes to the main pom.xml, imported the pom.xml and downloaded all the sources
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
<!--<optional>true</optional>-->
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.40</version>
<scope>test</scope>
</dependency>
- and ran the unit test BouncyCastleByProviderStringEncryptorTest in the IDE debugger.
What I found is that when I set a break point in the bouncycastle library constructor class JCEBlockCipher.java or other classes where it should stop at a breakpoint.
The IDE does not stop at the breakpoint inside bouncycastle library.
Please let me know what I am doing wrong...
Thanx in advance
- Young
I believe this worked in Intellij IDE 11
请先登录再写评论。
Hi Young,
Checked the 'jasypt' project and it looks like your setup is incorrect - the pom.xml already has the following section:
So, when you add a dependency definition below
your project has two 'bcprov' dependencies. Try to replace the first one with yours if necessary
Denis
Hi,
Thank you for the response.
In the main pom.xml, I replaced the original dependency
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk12</artifactId>
<version>130</version>
<scope>test</scope>
</dependency>
with version 1.40 of
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.40</version>
<scope>test</scope>
</dependency>
So I have only one entry in the pom.xml.
Please review the modified pom.xml I am using (see attached)
Thanx.
- Young
Attachment(s):
pom.xml
Ok, so, does the ide stops on break points now? Are you sure that the code with break point is actually executed?
Denis
no, it does not stop at the expected break point in bouncycastle module, when I run BouncyCastleByProviderStringEncryptorTest in debug mode.
And I am sure the code should be excuted as I set the breakpoint inside the default BouncyCastleProvider constructor (line 64),
...
public BouncyCastleProvider()
{
(line 64) >> super(PROVIDER_NAME, 1.40, info); <<
for (int i = 0; i != SYMMETRIC_CIPHERS.length; i++)
{
Class clazz = null;
try
{
This is called from the unit test I am running BouncyCastleByProviderStringEncryptorTest (line 32) (see below)
...
package org.jasypt.encryption.pbe;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
public class BouncyCastleByProviderStringEncryptorTest
extends AbstractPBEStringEncryptorTest {
protected PBEStringEncryptor createPBEStringEncryptor() {
StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
encryptor.setAlgorithm("PBEWITHSHA256AND128BITAES-CBC-BC");
(line 32) >> encryptor.setProvider(new BouncyCastleProvider()); <<
return encryptor;
}
}
Thanx.
- Young
Oh, I see now.
Asked our debugger guy to have a look into.
Denis
Thanx for the follow-up. Please let me know...
- Young
The problem is that target class file is compiled with no debug info at all. The IDE shows hint for that:
Note that you need to run the process being debugged in order for the IDE to be able to check break points states.
bouncycastle site mentions the following though:
Denis