Change value of string array at debug eclipse--转
Question:
I have an application, but to test something, I need to change value of a String[].
But when I do it using change value in variables tab, everytime it gives error.
I have tried using :
{"string1", "string2"}
["string1", "string2"]
[string1, string2]
etc. But had no luck. Can anybody plese tell how to do this?
Answer:
See, you can't actually add(change) value in array while debugging.
But there is a work around, you need to assign new string array to this reference like,
new String[]{"string1", "string2"}
But this will remove old entries, so if you want to only add new values best way is to, copy old values from the variables tab.
new String[]{old values..., "string1", "string2"}
原文地址:http://stackoverflow.com/questions/23270464/change-value-of-string-array-at-debug-eclipse
Change value of string array at debug eclipse--转的更多相关文章
- [V5] ARM: dts: Change i2s compatible string on exynos5250【转】
本文转载自:https://patchwork.kernel.org/patch/2845464/ Padmavathi VennaAug. 16, 2013, 4:26 a.m. UTC This ...
- c++ hex string array 转换 串口常用
c++ hex string array 转换 效果如下 tset string is follow 0x50 55 0x35 00 10 203040506073031323334ff format ...
- JavaScript string array 数组
Array类可以如下定义: var aValues = new Array(); 如果预先知道数组的长度,可以用参数传递长度 var aValues = new Array(20); -------- ...
- js基础小总结之string&array&object
一.数据类型之间的转换 string--->number :parseInt(string)/parseFloat(string); 注:在Date中,因为返回值date为单位为ms的字符串,将 ...
- js常用API 数据类型 基本类型,基本包装类型,引用类型 Object String Array Boolean Number Date Math
数据类型 变量.作用域及内存 基础类型(primitive value):Undefined.Null.Boolean.Number和String.这些类型在内存中分别占用固定大小的空间,他们的值保存 ...
- C#"曾经的字符串数组"string[] array=new string[]{"**","****"};
写博客是一件很伟大的事情,尤其是也牛逼的博客,因为它能帮助需要的人,更能使自己对知识有一个更为深刻的理解! 欢迎关注我的博客! 字符串操作(取当前时间) string time=convert.tos ...
- JavaScript学习 - 基础(五) - string/array/function/windows对象
String对象 更详细转:http://www.w3school.com.cn/jsref/jsref_obj_string.asp //------------------------------ ...
- Java SE 基础知识(String,Array)
String 类: 1. 对于String对象的相等性判断来说,请使用equals()方法,而不是==.String的equals()是判断当前字符串与传进来的字符串的内容是否一致. 2. Strin ...
- js基础篇string&&array(应YX同学面试复习要求 - -)
js中的数据类型一共有五个基本数据类型,分别是undefined,null,boolean,number,string. js中的Object类型中包括两大类型:Function类型和array类型. ...
随机推荐
- Thread.sleep(0)的意义
我们可能经常会用到 Thread.Sleep 函数来使线程挂起一段时间.那么你有没有正确的理解这个函数的用法呢?思考下面这两个问题: 假设现在是 2008-4-7 12:00:00.000,如果我调用 ...
- Spring 整合Redis 出现 afterPropertiesSet signature: ()V) Incompatible argument to function 解决办法
正在做SpringMVC+Redis整合的练习 使用的是 spring-data-redis 和 Jedis 配置好之后出现了以下错误: Caused by: java.lang.VerifyErro ...
- GET和POST详解
GET和POST 表单提交方式 http的get提交方法把表单数据编码到url中,可以在浏览器地址栏中看到, post提交把表单数据编码到http请求包的正文部分,在url中啊可能不到数据
- linux下shapely的安装
错误 1.“from shapely.geometry import Point, LineString, Polygon”时报错: OSError: Could not find library g ...
- couchdb and redis
http://www.jdon.com/artichect/scalable5.html http://www.dedecms.com/knowledge/data-base/nosql/2012/0 ...
- ubuntu 查本机 ip地址的命令是什么, 详细信息的?
使用ifconfig命令即可.你一敲进去都出来了
- Ultra-QuickSort (poj 2002)
Description In this problem, you have to analyze a particular sorting algorithm. The algorithm proce ...
- bit、sbin、sfr、sfr16 区别分析
1.bit 和 sbit 都是 C51 扩展的变量类型. bit 和 int char 之类的差不多,只不过 char=8 位, bit=1 位而已.都是变量,编译器在编译过程中分配地址.除非你指定, ...
- Mac开发者必备实用工具推荐
最近一个师兄给我推荐了一些Mac上的实用工具,用起来非常顺手,能提高不少开发效率.于是就想着把自己之前用过的其他工具也整理一下,一块推荐给大家,希望能对大家有帮助. Alfred 目前Mac下最好用的 ...
- 数据结构(主席树):HDU 5654 xiaoxin and his watermelon candy
Problem Description During his six grade summer vacation, xiaoxin got lots of watermelon candies fro ...