在Eclipse中预览长连接字符串

时间:2013-01-13 13:58:04

标签: java android eclipse

如何预览长字符串(SQL查询),例如(Eclipse Juno中Android代码的实际代码):

String insert_reminder = "INSERT INTO REMINDERS (NAME, DESCRIPTION, REMIND_TIMESTAMP, REMIND_TYPE_ID, STATE, STATUS_ID, IMAGE_ID, REMIND_RINGTONE) "
                        + "VALUES (\'"
                        + data.getStringExtra("remind_name")
                        + "\',\'"
                        + data.getStringExtra("remind_description")
                        + "\', "
                        + data.getLongExtra("remind_timestamp", 0)
                        + ", 1, "
                        + data.getIntExtra("remind_state", 1)
                        + ", 1,"
                        + data.getIntExtra("image_id", 1)
                        + ",\'"
                        + data.getStringExtra("remind_ringtone") + "\'" +
                        ")";

我希望看到完整的字符串,即使没有数据。例如上面:

"INSERT INTO REMINDERS (NAME, DESCRIPTION, REMIND_TIMESTAMP, REMIND_TYPE_ID, STATE, STATUS_ID, IMAGE_ID, REMIND_RINGTONE) VALUES ('data.getStringExtra("remind_name")', 'data.getStringExtra("remind_description")', data.getLongExtra("remind_timestamp", 0), 1, data.getIntExtra("remind_state", 1), 1, data.getIntExtra("image_id", 1), 'data.getStringExtra("remind_ringtone")')"

我需要这个来检查SQL查询中的逗号。 提前谢谢。

1 个答案:

答案 0 :(得分:1)

  • 在特定行设置断点
  • 以调试模式启动您的应用并继续直到它在断点处停止
  • 选择字符串并按ctrl + shif + i(检查)