【发布时间】:2012-02-06 19:23:06
【问题描述】:
当前指令指针..当我将调试器放在特定位置时,它会开始调试上一步,然后到达当前位置。调试器启动时,我可以在另一个位置看到带有调试器图标的当前指令指针。
请帮帮我,我这两天一直在努力摆脱它。
这是场景:
我已将调试器放在 viewattachment 上。它位于 openattachment 之后。 但是当我点击 openattachment 时,它开始被调试,然后当我点击 viewattachment 时,它开始调试..
为什么要打开附件?它对我来说是一个开销。有人可以帮我吗?
如果我的问题不清楚,请告诉我。
代码如下............
else if (getParameters().get("type") != null && getParameters().get("type")[0].equals("**viewattachment**")){
String elementUid = getParameters().get("elementUid")[0];
String target = "failure";
JSONObject obj = new JSONObject();
if (!isUserLoggedIn()){
target="session";
obj.put("result", target);
}
else{
if (!isValidUid(cardUid) || !isValidUid(elementUid)){
//return "fail";
obj.put("result", "fail");
}
else {
setMessages(msgService.WSIGetAttachments(elementUid));
if (!isAccountManager()) {
Message msg = getMessages().get(0);
HttpServletResponse response = ServletActionContext.getResponse();
try{
response.getOutputStream().print(obj.toString());
}
catch(IOException e){
log.error(e);
}
response.setContentType(msg.getAttachmentcontentType());
response.setHeader("filename", msg.getAttachmentName());
response.getWriter().print(obj);
response.getWriter().flush();
response.getWriter().close();
}
return null;
}
}
}
else if (getParameters().get("type") != null && getParameters().get("type")[0].equals("**openattachment**")){
String elementUid = getParameters().get("elementUid")[0];
if (elementUid != null) {//Conversion detail request
JSONArray array = new JSONArray();
JSONObject obj = new JSONObject();
if (!isValidUid(elementUid)){
obj.put("result", "fail");
obj.put("message", "Not a valid element");
}
else{
setMessages(msgService.WSIGetAttachments(elementUid));
obj.put("result","success");
if (getMessages() != null && getMessages().size() > 0){
for (Message m : getMessages()){
JSONObject obj1 = new JSONObject();
obj1.put("attachmentname", m.getAttachmentName());
obj1.put("elementUid", m.getElementUID());
array.add(obj1);
}
}
obj.put("messages", array);
HttpServletResponse httpResponse = ServletActionContext.getResponse();
try{
httpResponse.getOutputStream().print(obj.toString());
}
catch(IOException e){
log.error(e);
}
return null;
}
}
}
【问题讨论】:
-
这只是我遇到此问题的代码中的位置....我想知道如何删除当前位置指针..在放置断点时会调试其他行同班的其他地方.....
标签: eclipse